	.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, -68(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	_PAGE_MASK@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rcx, %rdi
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, %rsi
	callq	_iommu_num_pages
	movl	%eax, %ebx
	movq	(%r15), %r15
	andq	%r13, %r15
	movq	_total_map_requests@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_INC_STATS_COUNTER
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	cmpl	$2, %ebx
	jb	LBB0_2
## %bb.1:
	movq	_cross_page@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_INC_STATS_COUNTER
LBB0_2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	notq	%rax
	cmpl	$0, 16(%rbp)
	je	LBB0_3
## %bb.4:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_get_order
	movq	$-1, %rbx
	movl	%eax, %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	shlq	%cl, %rbx
	notq	%rbx
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	andq	%r13, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%rbx, %rcx
	movl	24(%rbp), %r8d
	callq	_dma_ops_alloc_addresses
	movq	%rax, %r13
	xorl	%edi, %edi
	movq	_bad_dma_address@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%r12), %eax
	movl	%eax, 12(%r12)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_alloc_new_range
	testq	%rax, %rax
	je	LBB0_6
	jmp	LBB0_19
LBB0_7:
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_15
## %bb.8:
	movl	$-1, %r14d
	movq	%r13, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	movl	-68(%rbp), %r8d                 ## 4-byte Reload
	callq	_dma_ops_domain_map
	movq	_bad_dma_address@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rax, %r15
	addq	%rax, %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%r14d, %eax
	decl	%eax
	movl	%r14d, %ecx
	decl	%ecx
	movl	%ecx, %r14d
	cmpl	$-1, %eax
	jne	LBB0_9
LBB0_15:
	addq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	movq	_alloced_io_mem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_ADD_STATS_COUNTER
	cmpl	$0, (%r12)
	setne	%al
	movq	_amd_iommu_unmap_flush@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	4(%r12), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_iommu_flush_tlb
	movl	$0, (%r12)
	jmp	LBB0_19
LBB0_10:
	cmpl	$-1, %r14d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	je	LBB0_13
## %bb.11:
	negl	%r14d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	subq	(%rax), %rbx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_dma_ops_domain_unmap
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	decl	%r14d
	cmpl	$1, %r14d
	jg	LBB0_12
LBB0_13:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dma_ops_free_addresses
	movq	_bad_dma_address@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	jmp	LBB0_19
LBB0_17:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_iommu_has_npcache
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	4(%r12), %esi
	movq	%r14, %rdi
	movq	%r13, %rdx
	movq	%rbx, %rcx
	callq	_iommu_flush_pages
LBB0_19:
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_total_map_requests,4,2         ## @total_map_requests
	.comm	_cross_page,4,2                 ## @cross_page
	.comm	_bad_dma_address,8,3            ## @bad_dma_address
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_alloced_io_mem,4,2             ## @alloced_io_mem
	.comm	_amd_iommu_unmap_flush,4,2      ## @amd_iommu_unmap_flush
	.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, #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, x7
	mov	x28, x6
	str	w5, [sp, #20]                   ; 4-byte Folded Spill
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x27, x0
Lloh0:
	adrp	x24, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PAGE_MASK@GOTPAGEOFF]
	ldr	x21, [x24]
Lloh2:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	x2, [x8]
	mov	x0, x3
	str	x4, [sp, #24]                   ; 8-byte Folded Spill
	mov	x1, x4
	bl	_iommu_num_pages
	mov	x23, x0
	ldr	x24, [x24]
Lloh5:
	adrp	x8, _total_map_requests@GOTPAGE
Lloh6:
	ldr	x8, [x8, _total_map_requests@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_INC_STATS_COUNTER
	cmp	w23, #2
	b.lo	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _cross_page@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cross_page@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_INC_STATS_COUNTER
LBB0_2:
	and	x25, x24, x22
	cbz	w28, LBB0_4
; %bb.3:
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_get_order
	mov	x8, #-1
	lsl	x8, x8, x0
	mvn	x28, x8
	b	LBB0_5
LBB0_4:
	mov	x28, #0
LBB0_5:
	bic	x8, x22, x21
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh11:
	adrp	x21, _bad_dma_address@GOTPAGE
Lloh12:
	ldr	x21, [x21, _bad_dma_address@GOTPAGEOFF]
Lloh13:
	adrp	x24, _GFP_ATOMIC@GOTPAGE
Lloh14:
	ldr	x24, [x24, _GFP_ATOMIC@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x27
	mov	x1, x19
	mov	x2, x23
	mov	x3, x28
	mov	x4, x26
	bl	_dma_ops_alloc_addresses
	mov	x22, x0
	ldr	x8, [x21]
	cmp	x0, x8
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19, #8]
	str	w8, [x19, #12]
	ldr	w3, [x24]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_alloc_new_range
	cbz	x0, LBB0_6
	b	LBB0_20
LBB0_8:
Lloh15:
	adrp	x28, _PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x28, [x28, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w24, [sp, #20]                  ; 4-byte Folded Reload
	cbz	w23, LBB0_12
; %bb.9:
	mov	w27, #0
	mov	x26, x22
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x26
	mov	x3, x25
	mov	x4, x24
	bl	_dma_ops_domain_map
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x28]
	add	x25, x8, x25
	add	x26, x8, x26
	add	w27, w27, #1
	cmp	w23, w27
	b.ne	LBB0_10
LBB0_12:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x22, x22, x8
Lloh17:
	adrp	x8, _alloced_io_mem@GOTPAGE
Lloh18:
	ldr	x8, [x8, _alloced_io_mem@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	x21, [sp, #24]                  ; 8-byte Folded Reload
	mov	x1, x21
	bl	_ADD_STATS_COUNTER
	ldr	w8, [x19]
	cmp	w8, #0
Lloh20:
	adrp	x8, _amd_iommu_unmap_flush@GOTPAGE
Lloh21:
	ldr	x8, [x8, _amd_iommu_unmap_flush@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ccmp	w8, #0, #0, ne
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_18
; %bb.13:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_iommu_flush_tlb
	str	wzr, [x19]
	b	LBB0_20
LBB0_14:
	cbz	w27, LBB0_17
; %bb.15:
	add	w24, w27, #1
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x28]
	sub	x26, x26, x8
	mov	x0, x20
	mov	x1, x19
	mov	x2, x26
	bl	_dma_ops_domain_unmap
	sub	w24, w24, #1
	cmp	w24, #1
	b.gt	LBB0_16
LBB0_17:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_dma_ops_free_addresses
	ldr	x22, [x21]
	b	LBB0_20
LBB0_18:
	mov	x0, x20
	bl	_iommu_has_npcache
	bl	_unlikely
	cbz	x0, LBB0_20
; %bb.19:
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
	bl	_iommu_flush_pages
LBB0_20:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_total_map_requests,4,2         ; @total_map_requests
	.comm	_cross_page,4,2                 ; @cross_page
	.comm	_bad_dma_address,8,3            ; @bad_dma_address
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_alloced_io_mem,4,2             ; @alloced_io_mem
	.comm	_amd_iommu_unmap_flush,4,2      ; @amd_iommu_unmap_flush
	.no_dead_strip	___map_single
.subsections_via_symbols
