	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bounce_map_single
_bounce_map_single:                     ## @bounce_map_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -96(%rbp)                 ## 4-byte Spill
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r13d
	movq	%rdx, %rbx
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	movq	_VTD_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rdi
	callq	_ALIGN
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_find_domain
	movq	%rax, %r15
	movq	_DMA_NONE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	sete	%al
	testq	%r15, %r15
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_20
## %bb.1:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_domain_get_iommu
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_20
## %bb.2:
	xorl	%edi, %edi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_aligned_nrpages
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_dma_to_mm_pfn
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%eax, %edx
	movl	-96(%rbp), %ecx                 ## 4-byte Reload
	callq	_intel_alloc_iova
	testq	%rax, %rax
	je	LBB0_20
## %bb.3:
	movq	%rax, %r14
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rdx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, (%rax)
	je	LBB0_6
## %bb.4:
	cmpl	%ebx, (%rdx)
	je	LBB0_6
## %bb.5:
	movl	(%r12), %edi
	movq	%rdx, %r12
	callq	_cap_zlr
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	movq	_DMA_PTE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_7:
	movl	%ecx, -116(%rbp)                ## 4-byte Spill
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpl	%ebx, (%rdx)
	movq	_DMA_PTE_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovel	%ecx, %r12d
	cmpl	%ebx, (%rax)
	cmovel	%ecx, %r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	orq	%rbx, %rdi
	movq	_VTD_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	jne	LBB0_15
## %bb.8:
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	_io_tlb_start@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	___phys_to_dma
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, (%rsp)
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %r9d
	callq	_swiotlb_tbl_map_single
	movq	%rax, %r13
	movq	_DMA_MAPPING_ERROR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_19
## %bb.9:
	movq	%r13, %rdi
	callq	_phys_to_virt
	movq	_DMA_ATTR_SKIP_CPU_SYNC@GOTPCREL(%rip), %rcx
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	testq	%rdx, (%rcx)
	movq	%r13, %rbx
	je	LBB0_11
## %bb.10:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_14
LBB0_11:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rcx)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_13
## %bb.12:
	movq	%rsi, %rdx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	cmpl	%edi, (%rcx)
	jne	LBB0_14
LBB0_13:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	movq	%rsi, %rdx
	subq	%rcx, %rdx
LBB0_14:
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
LBB0_15:
	orl	-116(%rbp), %r12d               ## 4-byte Folded Reload
	movq	%r14, %rdi
	callq	_mm_to_dma_pfn
	movq	_VTD_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	%rbx, %rdx
	shrq	%cl, %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	%r12d, %r8d
	callq	_domain_pfn_mapping
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_is_swiotlb_buffer
	testq	%rax, %rax
	movq	%rbx, %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, %r8d
	movq	-112(%rbp), %r9                 ## 8-byte Reload
	callq	_swiotlb_tbl_unmap_single
LBB0_19:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_dma_to_mm_pfn
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_free_iova_fast
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movl	%r15d, %r8d
	callq	_dev_err
LBB0_20:
	movq	_DMA_MAPPING_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_21:
	movq	%r14, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rbx
	movb	(%rbx), %cl
	movq	%r14, %rsi
	shlq	%cl, %rsi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_trace_bounce_map_single
	movb	(%rbx), %cl
	shlq	%cl, %r14
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_VTD_PAGE_SIZE,4,2              ## @VTD_PAGE_SIZE
	.comm	_DMA_NONE,4,2                   ## @DMA_NONE
	.comm	_DMA_MAPPING_ERROR,8,3          ## @DMA_MAPPING_ERROR
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DMA_PTE_READ,4,2               ## @DMA_PTE_READ
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_PTE_WRITE,4,2              ## @DMA_PTE_WRITE
	.comm	_io_tlb_start,4,2               ## @io_tlb_start
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,8,3     ## @DMA_ATTR_SKIP_CPU_SYNC
	.comm	_VTD_PAGE_SHIFT,8,3             ## @VTD_PAGE_SHIFT
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device bounce map: %zx@%llx dir %d --- failed\n"

	.no_dead_strip	_bounce_map_single
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bounce_map_single
_bounce_map_single:                     ; @bounce_map_single
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x26, x5
	mov	x23, x4
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x27, _VTD_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _VTD_PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x2
	bl	_ALIGN
	mov	x25, x0
	mov	x0, x22
	bl	_find_domain
	mov	x24, x0
Lloh2:
	adrp	x8, _DMA_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w21
	ccmp	x0, #0, #4, ne
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_19
; %bb.1:
	mov	x0, x24
	bl	_domain_get_iommu
	mov	x28, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_19
; %bb.2:
	mov	x1, x19
	bl	_aligned_nrpages
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	bl	_dma_to_mm_pfn
	mov	x2, x0
	mov	x0, x22
	mov	x1, x24
	mov	x3, x26
	bl	_intel_alloc_iova
	cbz	x0, LBB0_19
; %bb.3:
Lloh5:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x10, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w9, [x10]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	b.eq	LBB0_6
; %bb.4:
	ldr	w0, [x28]
	mov	x28, x10
	bl	_cap_zlr
	mov	x10, x28
	cbz	w0, LBB0_6
; %bb.5:
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x8, _DMA_PTE_READ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMA_PTE_READ@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
LBB0_7:
Lloh13:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x10]
	cmp	w9, w21
	ccmp	w8, w21, #4, ne
Lloh16:
	adrp	x8, _DMA_PTE_WRITE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DMA_PTE_WRITE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	csel	w26, w8, wzr, eq
	orr	x0, x19, x20
	ldr	w1, [x27]
	mov	x27, x10
	bl	_IS_ALIGNED
	mov	x28, x20
	cbnz	w0, LBB0_15
; %bb.8:
	str	w26, [sp, #8]                   ; 4-byte Folded Spill
Lloh19:
	adrp	x8, _io_tlb_start@GOTPAGE
Lloh20:
	ldr	x8, [x8, _io_tlb_start@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x22
	bl	___phys_to_dma
	mov	x1, x0
	mov	x0, x22
	mov	x2, x20
	mov	x3, x19
	mov	x4, x25
	mov	x5, x21
	mov	x6, x23
	bl	_swiotlb_tbl_map_single
Lloh22:
	adrp	x8, _DMA_MAPPING_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DMA_MAPPING_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cmp	x0, x8
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	b.eq	LBB0_18
; %bb.9:
	mov	x28, x0
	bl	_phys_to_virt
Lloh25:
	adrp	x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	tst	x8, x23
	b.eq	LBB0_11
; %bb.10:
	mov	x2, x25
	b	LBB0_14
LBB0_11:
Lloh28:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_13
; %bb.12:
	ldr	w8, [x27]
	mov	x2, x25
	cmp	w8, w21
	b.ne	LBB0_14
LBB0_13:
	add	x0, x0, x19
	sub	x2, x25, x19
LBB0_14:
	mov	w1, #0
	bl	_memset
	ldr	w26, [sp, #8]                   ; 4-byte Folded Reload
LBB0_15:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	orr	w27, w26, w8
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x26
	bl	_mm_to_dma_pfn
	mov	x1, x0
Lloh31:
	adrp	x8, _VTD_PAGE_SHIFT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _VTD_PAGE_SHIFT@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	lsr	x2, x28, x8
	mov	x0, x24
	ldr	x3, [sp, #24]                   ; 8-byte Folded Reload
	mov	x4, x27
	bl	_domain_pfn_mapping
	cbz	w0, LBB0_21
; %bb.16:
	mov	x0, x28
	bl	_is_swiotlb_buffer
	cbz	x0, LBB0_18
; %bb.17:
	mov	x0, x22
	mov	x1, x28
	mov	x2, x19
	mov	x3, x25
	mov	x4, x21
	mov	x5, x23
	bl	_swiotlb_tbl_unmap_single
LBB0_18:
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_dma_to_mm_pfn
	mov	x2, x0
	mov	x0, x24
	mov	x1, x26
	bl	_free_iova_fast
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x19
	mov	x3, x20
	mov	x4, x21
	bl	_dev_err
LBB0_19:
Lloh36:
	adrp	x8, _DMA_MAPPING_ERROR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _DMA_MAPPING_ERROR@GOTPAGEOFF]
Lloh38:
	ldr	x0, [x8]
LBB0_20:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_21:
Lloh39:
	adrp	x21, _PAGE_SHIFT@GOTPAGE
Lloh40:
	ldr	x21, [x21, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	x8, [x21]
	lsl	x1, x26, x8
	mov	x0, x22
	mov	x2, x20
	mov	x3, x19
	bl	_trace_bounce_map_single
	ldr	x8, [x21]
	lsl	x0, x26, x8
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_VTD_PAGE_SIZE,4,2              ; @VTD_PAGE_SIZE
	.comm	_DMA_NONE,4,2                   ; @DMA_NONE
	.comm	_DMA_MAPPING_ERROR,8,3          ; @DMA_MAPPING_ERROR
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DMA_PTE_READ,4,2               ; @DMA_PTE_READ
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_PTE_WRITE,4,2              ; @DMA_PTE_WRITE
	.comm	_io_tlb_start,4,2               ; @io_tlb_start
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,8,3     ; @DMA_ATTR_SKIP_CPU_SYNC
	.comm	_VTD_PAGE_SHIFT,8,3             ; @VTD_PAGE_SHIFT
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device bounce map: %zx@%llx dir %d --- failed\n"

	.no_dead_strip	_bounce_map_single
.subsections_via_symbols
