	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdhci_pci_enable_dma           ## -- Begin function sdhci_pci_enable_dma
	.p2align	4, 0x90
_sdhci_pci_enable_dma:                  ## @sdhci_pci_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_sdhci_priv
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %eax
	movl	%eax, %ecx
	andl	$16776960, %ecx                 ## imm = 0xFFFF00
	movq	_PCI_CLASS_SYSTEM_SDHCI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	shll	$8, %edx
	cmpl	%edx, %ecx
	jne	LBB0_4
## %bb.1:
	movzbl	%al, %eax
	movq	_PCI_SDHCI_IFDMA@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.2:
	movq	_SDHCI_USE_SDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_4
## %bb.3:
	leaq	4(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_4:
	movq	%rbx, %rdi
	callq	_pci_set_master
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CLASS_SYSTEM_SDHCI,4,2     ## @PCI_CLASS_SYSTEM_SDHCI
	.comm	_PCI_SDHCI_IFDMA,4,2            ## @PCI_SDHCI_IFDMA
	.comm	_SDHCI_USE_SDMA,4,2             ## @SDHCI_USE_SDMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Will use DMA mode even though HW doesn't fully claim to support it.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdhci_pci_enable_dma           ; -- Begin function sdhci_pci_enable_dma
	.p2align	2
_sdhci_pci_enable_dma:                  ; @sdhci_pci_enable_dma
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_sdhci_priv
	ldr	x8, [x0]
	ldr	x19, [x8]
	ldr	w8, [x19]
	and	w9, w8, #0xffff00
Lloh0:
	adrp	x10, _PCI_CLASS_SYSTEM_SDHCI@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PCI_CLASS_SYSTEM_SDHCI@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w9, w10, lsl #8
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _PCI_SDHCI_IFDMA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_SDHCI_IFDMA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, w8, uxtb
	b.eq	LBB0_4
; %bb.2:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _SDHCI_USE_SDMA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SDHCI_USE_SDMA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	add	x0, x19, #4
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_4:
	mov	x0, x19
	bl	_pci_set_master
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CLASS_SYSTEM_SDHCI,4,2     ; @PCI_CLASS_SYSTEM_SDHCI
	.comm	_PCI_SDHCI_IFDMA,4,2            ; @PCI_SDHCI_IFDMA
	.comm	_SDHCI_USE_SDMA,4,2             ; @SDHCI_USE_SDMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Will use DMA mode even though HW doesn't fully claim to support it.\n"

.subsections_via_symbols
