	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __unmap_single
___unmap_single:                        ## @__unmap_single
	.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	_bad_dma_address@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	je	LBB0_8
## %bb.1:
	movq	%rdx, %r15
	movq	%rsi, %rbx
	leaq	(%rcx,%rdx), %rax
	cmpq	(%rsi), %rax
	ja	LBB0_8
## %bb.2:
	movq	%rdi, %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	movq	%r15, %rdi
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rsi
	callq	_iommu_num_pages
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	andq	%r15, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_dma_ops_domain_unmap
	addq	(%r14), %r13
	decq	%r15
	jne	LBB0_4
LBB0_5:
	movq	_alloced_io_mem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_SUB_STATS_COUNTER
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dma_ops_free_addresses
	movq	_amd_iommu_unmap_flush@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_7
## %bb.6:
	cmpl	$0, 8(%rbx)
	je	LBB0_8
LBB0_7:
	movl	12(%rbx), %esi
	movq	%r12, %rdi
	movq	%r14, %rcx
	callq	_iommu_flush_pages
	movl	$0, 8(%rbx)
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bad_dma_address,8,3            ## @bad_dma_address
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_alloced_io_mem,4,2             ## @alloced_io_mem
	.comm	_amd_iommu_unmap_flush,8,3      ## @amd_iommu_unmap_flush
	.no_dead_strip	___unmap_single
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __unmap_single
___unmap_single:                        ; @__unmap_single
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _bad_dma_address@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bad_dma_address@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	b.eq	LBB0_8
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	ldr	x8, [x1]
	add	x9, x3, x2
	cmp	x9, x8
	b.hi	LBB0_8
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x2, [x26]
	mov	x0, x21
	mov	x1, x20
	bl	_iommu_num_pages
Lloh5:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	and	x23, x8, x21
	mov	w24, w0
	cbz	w0, LBB0_5
; %bb.3:
	mov	x27, x24
	mov	x25, x23
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x19
	mov	x2, x25
	bl	_dma_ops_domain_unmap
	ldr	x8, [x26]
	add	x25, x8, x25
	subs	x27, x27, #1
	b.ne	LBB0_4
LBB0_5:
Lloh8:
	adrp	x8, _alloced_io_mem@GOTPAGE
Lloh9:
	ldr	x8, [x8, _alloced_io_mem@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_SUB_STATS_COUNTER
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_dma_ops_free_addresses
Lloh11:
	adrp	x8, _amd_iommu_unmap_flush@GOTPAGE
Lloh12:
	ldr	x8, [x8, _amd_iommu_unmap_flush@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cbnz	x8, LBB0_7
; %bb.6:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_8
LBB0_7:
	ldr	w1, [x19, #12]
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	bl	_iommu_flush_pages
	str	wzr, [x19, #8]
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_bad_dma_address,8,3            ; @bad_dma_address
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_alloced_io_mem,4,2             ; @alloced_io_mem
	.comm	_amd_iommu_unmap_flush,8,3      ; @amd_iommu_unmap_flush
	.no_dead_strip	___unmap_single
.subsections_via_symbols
