	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_set_dma_mask
_sdhci_set_dma_mask:                    ## @sdhci_set_dma_mask
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_mmc_dev
	movq	%rax, %r14
	movq	_SDHCI_QUIRK2_BROKEN_64_BIT_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.1:
	movq	_SDHCI_USE_64_BIT_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	notl	%eax
	andl	4(%rbx), %eax
	movl	%eax, 4(%rbx)
	testl	%eax, %ecx
	je	LBB0_5
LBB0_2:
	movl	$64, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movq	%r15, %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	movq	_SDHCI_USE_64_BIT_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 4(%rbx)
	jmp	LBB0_6
LBB0_4:
	movl	4(%rbx), %eax
	movq	_SDHCI_USE_64_BIT_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_2
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
LBB0_6:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	jmp	LBB0_11
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SDHCI_QUIRK2_BROKEN_64_BIT_DMA,4,2 ## @SDHCI_QUIRK2_BROKEN_64_BIT_DMA
	.comm	_SDHCI_USE_64_BIT_DMA,4,2       ## @SDHCI_USE_64_BIT_DMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Failed to set 64-bit DMA mask.\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: Failed to set 32-bit DMA mask.\n"

	.no_dead_strip	_sdhci_set_dma_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_set_dma_mask
_sdhci_set_dma_mask:                    ; @sdhci_set_dma_mask
	.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	x21, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_mmc_dev
	mov	x20, x0
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _SDHCI_QUIRK2_BROKEN_64_BIT_DMA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SDHCI_QUIRK2_BROKEN_64_BIT_DMA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x22, _SDHCI_USE_64_BIT_DMA@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SDHCI_USE_64_BIT_DMA@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	w8, [x22]
	ldr	w9, [x21, #4]
	bic	w9, w9, w8
	str	w9, [x21, #4]
	tst	w8, w9
	b.eq	LBB0_5
LBB0_2:
	mov	w0, #64
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_mmc_hostname
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	ldr	w8, [x22]
	ldr	w9, [x21, #4]
	bic	w8, w9, w8
	str	w8, [x21, #4]
	b	LBB0_6
LBB0_4:
	ldr	w9, [x21, #4]
	ldr	w8, [x22]
	tst	w8, w9
	b.ne	LBB0_2
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
LBB0_6:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_dma_set_mask_and_coherent
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_mmc_hostname
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
	b	LBB0_9
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x20
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SDHCI_QUIRK2_BROKEN_64_BIT_DMA,4,2 ; @SDHCI_QUIRK2_BROKEN_64_BIT_DMA
	.comm	_SDHCI_USE_64_BIT_DMA,4,2       ; @SDHCI_USE_64_BIT_DMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Failed to set 64-bit DMA mask.\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: Failed to set 32-bit DMA mask.\n"

	.no_dead_strip	_sdhci_set_dma_mask
.subsections_via_symbols
