	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esdhc_of_enable_dma
_esdhc_of_enable_dma:                   ## @esdhc_of_enable_dma
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_mmc_dev
	movq	%rax, %r15
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movl	$40, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
LBB0_3:
	movq	_ESDHC_DMA_SYSCTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_sdhci_readl
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_of_dma_is_coherent
	movq	_ESDHC_DMA_SNOOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	orl	%ebx, %ecx
	notl	%esi
	andl	%ebx, %esi
	testq	%rax, %rax
	cmovnel	%ecx, %esi
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_sdhci_writel
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fsl,ls1043a-esdhc"

L_.str.1:                               ## @.str.1
	.asciz	"fsl,ls1046a-esdhc"

	.comm	_ESDHC_DMA_SYSCTL,4,2           ## @ESDHC_DMA_SYSCTL
	.comm	_ESDHC_DMA_SNOOP,4,2            ## @ESDHC_DMA_SNOOP
	.no_dead_strip	_esdhc_of_enable_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esdhc_of_enable_dma
_esdhc_of_enable_dma:                   ; @esdhc_of_enable_dma
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0]
	bl	_mmc_dev
	mov	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_device_is_compatible
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_of_device_is_compatible
	cbz	x0, LBB0_3
LBB0_2:
	mov	w0, #40
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_dma_set_mask_and_coherent
LBB0_3:
Lloh4:
	adrp	x22, _ESDHC_DMA_SYSCTL@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ESDHC_DMA_SYSCTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readl
	mov	x21, x0
	ldr	w0, [x20]
	bl	_of_dma_is_coherent
Lloh6:
	adrp	x8, _ESDHC_DMA_SNOOP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ESDHC_DMA_SNOOP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w9, w8, w21
	bic	w8, w21, w8
	cmp	x0, #0
	csel	w1, w8, w9, eq
	ldr	w2, [x22]
	mov	x0, x19
	bl	_sdhci_writel
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fsl,ls1043a-esdhc"

l_.str.1:                               ; @.str.1
	.asciz	"fsl,ls1046a-esdhc"

	.comm	_ESDHC_DMA_SYSCTL,4,2           ; @ESDHC_DMA_SYSCTL
	.comm	_ESDHC_DMA_SNOOP,4,2            ; @ESDHC_DMA_SNOOP
	.no_dead_strip	_esdhc_of_enable_dma
.subsections_via_symbols
