	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msdc_get_cd
_msdc_get_cd:                           ## @msdc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_mmc_priv
	movq	%rax, %rcx
	movq	_MMC_CAP_NONREMOVABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %eax
	testl	%edx, (%rbx)
	je	LBB0_1
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	cmpl	$0, 8(%rcx)
	je	LBB0_6
## %bb.2:
	movq	_MSDC_PS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rcx), %rdi
	callq	_readl
	movl	%eax, %ecx
	movq	_MSDC_PS_CDSTS@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	movq	_MMC_CAP2_CD_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	setne	%al
	jmp	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mmc_gpio_get_cd                ## TAILCALL
LBB0_4:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	sete	%al
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_CAP_NONREMOVABLE,4,2       ## @MMC_CAP_NONREMOVABLE
	.comm	_MSDC_PS,8,3                    ## @MSDC_PS
	.comm	_MSDC_PS_CDSTS,4,2              ## @MSDC_PS_CDSTS
	.comm	_MMC_CAP2_CD_ACTIVE_HIGH,4,2    ## @MMC_CAP2_CD_ACTIVE_HIGH
	.no_dead_strip	_msdc_get_cd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msdc_get_cd
_msdc_get_cd:                           ; @msdc_get_cd
	.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	x19, x0
	bl	_mmc_priv
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _MMC_CAP_NONREMOVABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_CAP_NONREMOVABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	w0, #1
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_6
; %bb.4:
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _MSDC_PS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MSDC_PS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh6:
	adrp	x8, _MSDC_PS_CDSTS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSDC_PS_CDSTS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
	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
	b.eq	LBB0_7
; %bb.5:
	cmp	w8, #0
	cset	w0, ne
	b	LBB0_2
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mmc_gpio_get_cd
LBB0_7:
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_CAP_NONREMOVABLE,4,2       ; @MMC_CAP_NONREMOVABLE
	.comm	_MSDC_PS,8,3                    ; @MSDC_PS
	.comm	_MSDC_PS_CDSTS,4,2              ; @MSDC_PS_CDSTS
	.comm	_MMC_CAP2_CD_ACTIVE_HIGH,4,2    ; @MMC_CAP2_CD_ACTIVE_HIGH
	.no_dead_strip	_msdc_get_cd
.subsections_via_symbols
