	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdmmc_get_cd
_sdmmc_get_cd:                          ## @sdmmc_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
	callq	_mmc_priv
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.1:
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	%rax, %rbx
	movq	16(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	-28(%rbp), %rsi
	movq	%r14, %rdi
	callq	_rtsx_usb_get_card_status
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	je	LBB0_3
LBB0_5:
	movl	$0, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_SD_CD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -28(%rbp)
	je	LBB0_5
## %bb.4:
	movl	$1, (%rbx)
	movl	$1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEDIUM,4,2                  ## @ENOMEDIUM
	.comm	_SD_CD,4,2                      ## @SD_CD
	.no_dead_strip	_sdmmc_get_cd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdmmc_get_cd
_sdmmc_get_cd:                          ; @sdmmc_get_cd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_mmc_priv
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOMEDIUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEDIUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x19, x0
	ldr	x20, [x0, #16]
	mov	x0, x20
	bl	_mutex_lock
	add	x1, sp, #12
	mov	x0, x20
	bl	_rtsx_usb_get_card_status
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	cbz	w21, LBB0_4
LBB0_3:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_6
LBB0_4:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _SD_CD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SD_CD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.5:
	mov	w0, #1
	str	w0, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEDIUM,4,2                  ; @ENOMEDIUM
	.comm	_SD_CD,4,2                      ; @SD_CD
	.no_dead_strip	_sdmmc_get_cd
.subsections_via_symbols
