	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxs_mmc_get_cd
_mxs_mmc_get_cd:                        ## @mxs_mmc_get_cd
	.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, %r14
	callq	_mmc_priv
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_mmc_gpio_get_cd
	testl	%eax, %eax
	jns	LBB0_6
## %bb.3:
	movq	_MMC_CAP_NEEDS_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movb	$1, %al
	testl	%ecx, (%r14)
	jne	LBB0_5
## %bb.4:
	addq	$8, %rbx
	movq	(%rbx), %r15
	movq	%rbx, %rdi
	callq	_HW_SSP_STATUS
	addq	%rax, %r15
	movq	%r15, %rdi
	callq	_readl
	movq	_BM_SSP_STATUS_CARD_DETECT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	sete	%al
LBB0_5:
	movq	_MMC_CAP2_CD_ACTIVE_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%r14)
	setne	%cl
	xorb	%al, %cl
	movzbl	%cl, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_MMC_CAP_NEEDS_POLL,4,2         ## @MMC_CAP_NEEDS_POLL
	.comm	_BM_SSP_STATUS_CARD_DETECT,4,2  ## @BM_SSP_STATUS_CARD_DETECT
	.comm	_MMC_CAP2_CD_ACTIVE_HIGH,4,2    ## @MMC_CAP2_CD_ACTIVE_HIGH
	.no_dead_strip	_mxs_mmc_get_cd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxs_mmc_get_cd
_mxs_mmc_get_cd:                        ; @mxs_mmc_get_cd
	.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
	bl	_mmc_priv
	mov	x20, x0
	ldr	x8, [x20], #8
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x0, x19
	bl	_mmc_gpio_get_cd
	tbz	w0, #31, LBB0_7
; %bb.3:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _MMC_CAP_NEEDS_POLL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_CAP_NEEDS_POLL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #1
	b	LBB0_6
LBB0_5:
	ldr	x21, [x20]
	mov	x0, x20
	bl	_HW_SSP_STATUS
	add	x0, x0, x21
	bl	_readl
Lloh6:
	adrp	x8, _BM_SSP_STATUS_CARD_DETECT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BM_SSP_STATUS_CARD_DETECT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, eq
LBB0_6:
	ldr	w9, [x19, #4]
Lloh9:
	adrp	x10, _MMC_CAP2_CD_ACTIVE_HIGH@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MMC_CAP2_CD_ACTIVE_HIGH@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w9, ne
	eor	w0, w8, w9
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_MMC_CAP_NEEDS_POLL,4,2         ; @MMC_CAP_NEEDS_POLL
	.comm	_BM_SSP_STATUS_CARD_DETECT,4,2  ; @BM_SSP_STATUS_CARD_DETECT
	.comm	_MMC_CAP2_CD_ACTIVE_HIGH,4,2    ; @MMC_CAP2_CD_ACTIVE_HIGH
	.no_dead_strip	_mxs_mmc_get_cd
.subsections_via_symbols
