	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_of_dma_configure               ## -- Begin function of_dma_configure
	.p2align	4, 0x90
_of_dma_configure:                      ## @of_dma_configure
	.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	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r13
	movl	$0, -44(%rbp)
	leaq	-48(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	callq	_of_dma_get_range
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_1
## %bb.4:
	movl	-52(%rbp), %edi
	subl	-48(%rbp), %edi
	callq	_PFN_DOWN
	movq	%rax, %r12
	movl	-44(%rbp), %edx
	testb	$1, %dl
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	movl	-44(%rbp), %edx
	incl	%edx
	movl	%edx, -44(%rbp)
LBB0_6:
	testl	%edx, %edx
	je	LBB0_7
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpq	$0, (%r13)
	jne	LBB0_11
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	leaq	8(%r13), %rax
	movq	%rax, (%r13)
LBB0_11:
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_15
## %bb.12:
	movl	8(%r13), %edi
	testl	%edi, %edi
	je	LBB0_14
## %bb.13:
	leal	1(%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_max
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, -44(%rbp)
	jmp	LBB0_15
LBB0_1:
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.3:
	movl	$0, -48(%rbp)
	xorl	%r12d, %r12d
	cmpq	$0, (%r13)
	jne	LBB0_11
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	movl	(%rax), %eax
	addl	%r15d, %eax
	cmovnel	%r15d, %ebx
	jmp	LBB0_20
LBB0_14:
	movl	$0, -44(%rbp)
	xorl	%eax, %eax
LBB0_15:
	movq	%r12, 16(%r13)
	movl	-48(%rbp), %ecx
	leal	(%rcx,%rax), %edi
	decl	%edi
	callq	_ilog2
	leaq	1(%rax), %rdi
	callq	_DMA_BIT_MASK
	andl	%eax, 8(%r13)
	movq	(%r13), %rcx
	andl	%eax, (%rcx)
	testl	%r15d, %r15d
	jne	LBB0_17
## %bb.16:
	movl	%eax, 24(%r13)
LBB0_17:
	movq	%r14, %rdi
	callq	_of_dma_is_coherent
	movl	%eax, %r15d
	testl	%eax, %eax
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.5(%rip), %r12
	movq	%r12, %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_of_iommu_configure
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_20
LBB0_19:
	testq	%r14, %r14
	leaq	L_.str.6(%rip), %rax
	cmoveq	%rax, %r12
	leaq	L_.str.7(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	movq	%r14, %rcx
	movl	%r15d, %r8d
	callq	_arch_setup_dma_ops
	xorl	%ebx, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid size 0x%llx for dma-range\n"

L_.str.1:                               ## @.str.1
	.asciz	"Adjusted size 0x%llx invalid\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"dma_pfn_offset(%#08lx)\n"

L_.str.3:                               ## @.str.3
	.asciz	"DMA mask not set\n"

L_.str.4:                               ## @.str.4
	.asciz	"device is%sdma coherent\n"

L_.str.5:                               ## @.str.5
	.asciz	" "

L_.str.6:                               ## @.str.6
	.asciz	" not "

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.7:                               ## @.str.7
	.asciz	"device is%sbehind an iommu\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_of_dma_configure               ; -- Begin function of_dma_configure
	.p2align	2
_of_dma_configure:                      ; @of_dma_configure
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #20]
	add	x1, sp, #28
	add	x2, sp, #24
	add	x3, sp, #20
	mov	x0, x20
	bl	_of_dma_get_range
	mov	x21, x0
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldp	w8, w9, [sp, #24]
	sub	w0, w8, w9
	bl	_PFN_DOWN
	mov	x22, x0
	ldr	w8, [sp, #20]
	tbz	w8, #0, LBB0_3
; %bb.2:
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	w8, [sp, #20]
	add	w8, w8, #1
	str	w8, [sp, #20]
LBB0_3:
	cbz	w8, LBB0_11
; %bb.4:
	str	x22, [sp]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x8, [x19]
	cbnz	x8, LBB0_6
LBB0_5:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	add	x8, x19, #8
	str	x8, [x19]
LBB0_6:
	ldr	w0, [sp, #20]
	cbnz	w0, LBB0_14
; %bb.7:
	ldr	w0, [x19, #8]
	cbz	w0, LBB0_13
; %bb.8:
	add	w1, w0, #1
	bl	_max
	str	w0, [sp, #20]
	b	LBB0_14
LBB0_9:
	cbz	w22, LBB0_12
; %bb.10:
	mov	x22, #0
	str	wzr, [sp, #28]
	ldr	x8, [x19]
	cbnz	x8, LBB0_6
	b	LBB0_5
LBB0_11:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_12:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmn	w21, w8
	csel	w0, wzr, w21, eq
	b	LBB0_19
LBB0_13:
	str	wzr, [sp, #20]
LBB0_14:
	str	x22, [x19, #16]
	ldr	w8, [sp, #28]
	add	w8, w8, w0
	sub	w0, w8, #1
	bl	_ilog2
	add	x0, x0, #1
	bl	_DMA_BIT_MASK
	ldr	w8, [x19, #8]
	and	w8, w8, w0
	str	w8, [x19, #8]
	ldr	x8, [x19]
	ldr	w9, [x8]
	and	w9, w9, w0
	str	w9, [x8]
	cbnz	w21, LBB0_16
; %bb.15:
	str	w0, [x19, #24]
LBB0_16:
	mov	x0, x20
	bl	_of_dma_is_coherent
	mov	x21, x0
Lloh14:
	adrp	x22, l_.str.5@PAGE
Lloh15:
	add	x22, x22, l_.str.5@PAGEOFF
Lloh16:
	adrp	x23, l_.str.6@PAGE
Lloh17:
	add	x23, x23, l_.str.6@PAGEOFF
	cmp	w0, #0
	csel	x8, x23, x22, eq
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x0, x19
	mov	x1, x20
	bl	_of_iommu_configure
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_18
; %bb.17:
	mov	x0, x20
	bl	_PTR_ERR
Lloh20:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_19
LBB0_18:
	cmp	x20, #0
	csel	x8, x23, x22, eq
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str.7@PAGE
Lloh24:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w1, [sp, #28]
	ldr	w2, [sp, #20]
	mov	x0, x19
	mov	x3, x20
	mov	x4, x21
	bl	_arch_setup_dma_ops
	mov	w0, #0
LBB0_19:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid size 0x%llx for dma-range\n"

l_.str.1:                               ; @.str.1
	.asciz	"Adjusted size 0x%llx invalid\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"dma_pfn_offset(%#08lx)\n"

l_.str.3:                               ; @.str.3
	.asciz	"DMA mask not set\n"

l_.str.4:                               ; @.str.4
	.asciz	"device is%sdma coherent\n"

l_.str.5:                               ; @.str.5
	.asciz	" "

l_.str.6:                               ; @.str.6
	.asciz	" not "

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.7:                               ; @.str.7
	.asciz	"device is%sbehind an iommu\n"

.subsections_via_symbols
