	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iommu_dma_mmap
_iommu_dma_mmap:                        ## @iommu_dma_mmap
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %r13
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	%r8, %rdi
	callq	_PAGE_ALIGN
	movq	%rax, %rbx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rbx
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %esi
	movq	%r15, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_dma_pgprot
	movl	%eax, 8(%r12)
	leaq	-44(%rbp), %r8
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_dma_mmap_from_dev_coherent
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	-44(%rbp), %eax
	jmp	LBB0_12
LBB0_2:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	subq	%r15, %rbx
	jbe	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_vma_pages
	cmpq	%rbx, %rax
	jbe	LBB0_5
LBB0_4:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_5:
	movq	_CONFIG_DMA_REMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%r14, %rdi
	callq	_is_vmalloc_addr
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%r14, %rdi
	callq	_dma_common_find_pages
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	___iommu_dma_mmap
	jmp	LBB0_12
LBB0_10:
	movq	%r14, %rdi
	callq	_virt_to_page
	movl	%eax, %edi
	callq	_page_to_pfn
	jmp	LBB0_11
LBB0_8:
	movq	%r14, %rdi
	callq	_vmalloc_to_pfn
LBB0_11:
	movq	16(%r12), %rsi
	addq	%r15, %rax
	movq	24(%r12), %rcx
	subq	%rsi, %rcx
	movl	8(%r12), %r8d
	movq	%r12, %rdi
	movq	%rax, %rdx
	callq	_remap_pfn_range
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_CONFIG_DMA_REMAP,4,2           ## @CONFIG_DMA_REMAP
	.no_dead_strip	_iommu_dma_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iommu_dma_mmap
_iommu_dma_mmap:                        ; @iommu_dma_mmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x23, x5
	mov	x20, x4
	mov	x21, x2
	mov	x19, x1
	mov	x24, x0
	mov	x0, x4
	bl	_PAGE_ALIGN
	mov	x22, x0
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x26, [x8]
	ldr	x25, [x19]
	ldr	w1, [x19, #8]
	mov	x0, x24
	mov	x2, x23
	bl	_dma_pgprot
	str	w0, [x19, #8]
	add	x4, sp, #12
	mov	x0, x24
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_dma_mmap_from_dev_coherent
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [sp, #12]
	b	LBB0_12
LBB0_2:
	lsr	x8, x22, x26
	subs	x22, x8, x25
	b.ls	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_vma_pages
	cmp	x0, x22
	b.ls	LBB0_5
LBB0_4:
Lloh3:
	adrp	x8, _ENXIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_5:
Lloh6:
	adrp	x8, _CONFIG_DMA_REMAP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONFIG_DMA_REMAP@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x21
	bl	_is_vmalloc_addr
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x21
	bl	_dma_common_find_pages
	cbz	x0, LBB0_10
; %bb.8:
	mov	x1, x20
	mov	x2, x19
	bl	___iommu_dma_mmap
	b	LBB0_12
LBB0_9:
	mov	x0, x21
	bl	_virt_to_page
	bl	_page_to_pfn
	b	LBB0_11
LBB0_10:
	mov	x0, x21
	bl	_vmalloc_to_pfn
LBB0_11:
	add	x2, x0, x25
	ldp	x1, x8, [x19, #16]
	sub	x3, x8, x1
	ldr	w4, [x19, #8]
	mov	x0, x19
	bl	_remap_pfn_range
LBB0_12:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_CONFIG_DMA_REMAP,4,2           ; @CONFIG_DMA_REMAP
	.no_dead_strip	_iommu_dma_mmap
.subsections_via_symbols
