	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __map_single
___map_single:                          ## @__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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, %eax
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_PAGE_MASK@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rsi
	callq	_iommu_num_pages
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r15), %r12d
	movq	%r14, %rdi
	movq	%rax, %r14
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_dma_ops_alloc_iova
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_dir2prot
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.3:
	movl	%eax, %r13d
	andl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %r15d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	movl	%r13d, %r8d
	callq	_iommu_map_page
	testl	%eax, %eax
	jne	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	addl	%ecx, %r12d
	addl	%ecx, %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addl	%r15d, %eax
	decl	%eax
	movl	%r15d, %edx
	decl	%edx
	movl	%edx, %r15d
	cmpl	$-1, %eax
	jne	LBB0_4
LBB0_10:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	notl	%eax
	andl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	addl	%eax, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_domain_flush_np_cache
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_5:
	cmpl	$-1, %r15d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	je	LBB0_8
## %bb.6:
	negl	%r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	subl	%edx, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_iommu_unmap_page
	decl	%r15d
	cmpl	$1, %r15d
	jg	LBB0_7
LBB0_8:
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_domain_flush_tlb
	movq	%rbx, %rdi
	callq	_domain_flush_complete
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dma_ops_free_iova
	movq	_DMA_MAPPING_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %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	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_DMA_MAPPING_ERROR,4,2          ## @DMA_MAPPING_ERROR
	.no_dead_strip	___map_single
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __map_single
___map_single:                          ; @__map_single
	.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
	mov	x21, x5
	mov	x24, x4
	mov	x26, x3
	mov	x23, x2
	mov	x19, x1
	mov	x25, x0
Lloh0:
	adrp	x22, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PAGE_MASK@GOTPAGEOFF]
	ldr	w28, [x22]
Lloh2:
	adrp	x27, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x23
	mov	x1, x3
	bl	_iommu_num_pages
	mov	x20, x0
	ldr	w22, [x22]
	mov	x0, x25
	mov	x1, x19
	mov	x2, x20
	mov	x3, x21
	bl	_dma_ops_alloc_iova
	cbz	w0, LBB0_6
; %bb.1:
	mov	x21, x0
	str	w28, [sp, #4]                   ; 4-byte Folded Spill
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x24
	bl	_dir2prot
	cbz	w20, LBB0_5
; %bb.2:
	mov	x25, x0
	mov	w28, #0
	and	w26, w22, w23
	ldr	w3, [x27]
Lloh4:
	adrp	x22, _GFP_ATOMIC@GOTPAGE
Lloh5:
	ldr	x22, [x22, _GFP_ATOMIC@GOTPAGEOFF]
	mov	x24, x21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w5, [x22]
	mov	x0, x19
	mov	x1, x24
	mov	x2, x26
	mov	x4, x25
	bl	_iommu_map_page
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w3, [x27]
	add	w26, w3, w26
	add	w24, w3, w24
	add	w28, w28, #1
	cmp	w20, w28
	b.ne	LBB0_3
LBB0_5:
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	bic	w8, w23, w8
	add	w20, w21, w8
	mov	x0, x19
	mov	x1, x20
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	bl	_domain_flush_np_cache
	b	LBB0_11
LBB0_6:
	mov	w20, #0
	b	LBB0_11
LBB0_7:
	cbz	w28, LBB0_10
; %bb.8:
	add	w22, w28, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x27]
	sub	w24, w24, w2
	mov	x0, x19
	mov	x1, x24
	bl	_iommu_unmap_page
	sub	w22, w22, #1
	cmp	w22, #1
	b.gt	LBB0_9
LBB0_10:
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_domain_flush_tlb
	mov	x0, x19
	bl	_domain_flush_complete
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_dma_ops_free_iova
Lloh6:
	adrp	x8, _DMA_MAPPING_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_MAPPING_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
LBB0_11:
	mov	x0, x20
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_DMA_MAPPING_ERROR,4,2          ; @DMA_MAPPING_ERROR
	.no_dead_strip	___map_single
.subsections_via_symbols
