	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdmmc_get_ro
_sdmmc_get_ro:                          ## @sdmmc_get_ro
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_mmc_priv
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	movq	8(%rax), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	-20(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_rtsx_usb_get_card_status
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jne	LBB0_4
## %bb.3:
	movq	_SD_WP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, -20(%rbp)
	setne	%al
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEDIUM,4,2                  ## @ENOMEDIUM
	.comm	_SD_WP,4,2                      ## @SD_WP
	.no_dead_strip	_sdmmc_get_ro
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdmmc_get_ro
_sdmmc_get_ro:                          ; @sdmmc_get_ro
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_mmc_priv
	ldr	x8, [x0]
	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_5
LBB0_2:
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_mutex_lock
	add	x1, sp, #12
	mov	x0, x19
	bl	_rtsx_usb_get_card_status
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	cbz	w20, LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _SD_WP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SD_WP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEDIUM,4,2                  ; @ENOMEDIUM
	.comm	_SD_WP,4,2                      ; @SD_WP
	.no_dead_strip	_sdmmc_get_ro
.subsections_via_symbols
