	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function map_page
_map_page:                              ## @map_page
	.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
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_page_to_phys
	movq	%rax, %r12
	movq	_cnt_map_single@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_INC_STATS_COUNTER
	movq	%rbx, %rdi
	callq	_check_device
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	addq	%r13, %r12
	movq	(%rbx), %rax
	movl	(%rax), %r13d
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_get_device_resources
	cmpq	$0, -56(%rbp)
	je	LBB0_8
## %bb.3:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.4:
	callq	_dma_ops_domain
	testl	%eax, %eax
	je	LBB0_1
## %bb.5:
	movq	-48(%rbp), %rdi
	callq	_spin_lock_irqsave
	movq	-56(%rbp), %rsi
	movq	-48(%rbp), %rax
	movl	4(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rcx
	movq	%r15, %r8
	movl	%r14d, %r9d
	pushq	%r13
	pushq	$0
	callq	___map_single
	addq	$16, %rsp
	movq	%rax, %r12
	movq	_bad_dma_address@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_7
## %bb.6:
	movq	-56(%rbp), %rdi
	callq	_iommu_completion_wait
LBB0_7:
	movq	-48(%rbp), %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_8
LBB0_1:
	movq	_bad_dma_address@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_8:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cnt_map_single,4,2             ## @cnt_map_single
	.comm	_bad_dma_address,8,3            ## @bad_dma_address
	.no_dead_strip	_map_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function map_page
_map_page:                              ; @map_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x22, x0
	mov	x0, x1
	bl	_page_to_phys
	mov	x23, x0
Lloh0:
	adrp	x8, _cnt_map_single@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cnt_map_single@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_INC_STATS_COUNTER
	mov	x0, x22
	bl	_check_device
	cbz	w0, LBB0_7
; %bb.1:
	add	x19, x23, x19
	ldr	x8, [x22]
	ldr	w23, [x8]
	add	x1, sp, #24
	add	x2, sp, #16
	add	x3, sp, #12
	mov	x0, x22
	bl	_get_device_resources
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_8
; %bb.2:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_8
; %bb.3:
	bl	_dma_ops_domain
	cbz	w0, LBB0_7
; %bb.4:
	ldr	x0, [sp, #16]
	bl	_spin_lock_irqsave
	ldp	x8, x1, [sp, #16]
	ldr	w2, [x8, #4]
	mov	x0, x22
	mov	x3, x19
	mov	x4, x21
	mov	x5, x20
	mov	w6, #0
	mov	x7, x23
	bl	___map_single
	mov	x19, x0
Lloh3:
	adrp	x8, _bad_dma_address@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bad_dma_address@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	ldr	x0, [sp, #24]
	bl	_iommu_completion_wait
LBB0_6:
	ldr	x0, [sp, #16]
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _bad_dma_address@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bad_dma_address@GOTPAGEOFF]
Lloh8:
	ldr	x19, [x8]
LBB0_8:
	mov	x0, x19
	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
	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	_cnt_map_single,4,2             ; @cnt_map_single
	.comm	_bad_dma_address,8,3            ; @bad_dma_address
	.no_dead_strip	_map_page
.subsections_via_symbols
