	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_set_card_detection
_sdhci_set_card_detection:              ## @sdhci_set_card_detection
	.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	_SDHCI_QUIRK_BROKEN_CARD_DETECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_mmc_card_is_removable
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.3:
	movq	_SDHCI_PRESENT_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sdhci_readl
	movq	_SDHCI_CARD_PRESENT@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	jne	LBB0_4
## %bb.5:
	movq	_SDHCI_INT_CARD_INSERT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	movq	_SDHCI_INT_CARD_REMOVE@GOTPCREL(%rip), %rax
	movq	_SDHCI_INT_CARD_INSERT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	notl	%esi
	andl	4(%rbx), %esi
	jmp	LBB0_8
LBB0_4:
	movq	_SDHCI_INT_CARD_REMOVE@GOTPCREL(%rip), %rax
LBB0_6:
	movl	4(%rbx), %esi
	orl	(%rax), %esi
LBB0_8:
	movl	%esi, 4(%rbx)
	movq	_SDHCI_INT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_sdhci_writel
	movl	4(%rbx), %esi
	movq	_SDHCI_SIGNAL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sdhci_writel                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_QUIRK_BROKEN_CARD_DETECTION,4,2 ## @SDHCI_QUIRK_BROKEN_CARD_DETECTION
	.comm	_SDHCI_PRESENT_STATE,4,2        ## @SDHCI_PRESENT_STATE
	.comm	_SDHCI_CARD_PRESENT,4,2         ## @SDHCI_CARD_PRESENT
	.comm	_SDHCI_INT_CARD_REMOVE,4,2      ## @SDHCI_INT_CARD_REMOVE
	.comm	_SDHCI_INT_CARD_INSERT,4,2      ## @SDHCI_INT_CARD_INSERT
	.comm	_SDHCI_INT_ENABLE,4,2           ## @SDHCI_INT_ENABLE
	.comm	_SDHCI_SIGNAL_ENABLE,4,2        ## @SDHCI_SIGNAL_ENABLE
	.no_dead_strip	_sdhci_set_card_detection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_set_card_detection
_sdhci_set_card_detection:              ; @sdhci_set_card_detection
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _SDHCI_QUIRK_BROKEN_CARD_DETECTION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SDHCI_QUIRK_BROKEN_CARD_DETECTION@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_mmc_card_is_removable
	cbz	w0, LBB0_1
; %bb.3:
	cbz	w20, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _SDHCI_PRESENT_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDHCI_PRESENT_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sdhci_readl
Lloh6:
	adrp	x8, _SDHCI_CARD_PRESENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDHCI_CARD_PRESENT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _SDHCI_INT_CARD_REMOVE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SDHCI_INT_CARD_REMOVE@GOTPAGEOFF]
Lloh11:
	adrp	x10, _SDHCI_INT_CARD_INSERT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SDHCI_INT_CARD_INSERT@GOTPAGEOFF]
	tst	w8, w0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w1, w9, w8
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x8, _SDHCI_INT_CARD_REMOVE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SDHCI_INT_CARD_REMOVE@GOTPAGEOFF]
Lloh15:
	adrp	x9, _SDHCI_INT_CARD_INSERT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SDHCI_INT_CARD_INSERT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #4]
	bic	w1, w9, w8
LBB0_6:
	str	w1, [x19, #4]
Lloh19:
	adrp	x8, _SDHCI_INT_ENABLE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SDHCI_INT_ENABLE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_sdhci_writel
	ldr	w1, [x19, #4]
Lloh22:
	adrp	x8, _SDHCI_SIGNAL_ENABLE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SDHCI_SIGNAL_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sdhci_writel
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_QUIRK_BROKEN_CARD_DETECTION,4,2 ; @SDHCI_QUIRK_BROKEN_CARD_DETECTION
	.comm	_SDHCI_PRESENT_STATE,4,2        ; @SDHCI_PRESENT_STATE
	.comm	_SDHCI_CARD_PRESENT,4,2         ; @SDHCI_CARD_PRESENT
	.comm	_SDHCI_INT_CARD_REMOVE,4,2      ; @SDHCI_INT_CARD_REMOVE
	.comm	_SDHCI_INT_CARD_INSERT,4,2      ; @SDHCI_INT_CARD_INSERT
	.comm	_SDHCI_INT_ENABLE,4,2           ; @SDHCI_INT_ENABLE
	.comm	_SDHCI_SIGNAL_ENABLE,4,2        ; @SDHCI_SIGNAL_ENABLE
	.no_dead_strip	_sdhci_set_card_detection
.subsections_via_symbols
