	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_get_ro
_sdhci_get_ro:                          ## @sdhci_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_mmc_priv
	movq	%rax, %r15
	movq	_SDHCI_QUIRK_UNSTABLE_RO_DETECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_9
## %bb.1:
	movq	_SAMPLE_COUNT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$30, %edi
	callq	_msleep
	incl	%ebx
	cmpl	(%r14), %ebx
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_sdhci_check_ro
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r12d
	jge	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_9:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_check_ro                 ## TAILCALL
LBB0_10:
	movl	$1, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_QUIRK_UNSTABLE_RO_DETECT,4,2 ## @SDHCI_QUIRK_UNSTABLE_RO_DETECT
	.comm	_SAMPLE_COUNT,4,2               ## @SAMPLE_COUNT
	.no_dead_strip	_sdhci_get_ro
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_get_ro
_sdhci_get_ro:                          ; @sdhci_get_ro
	.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
	bl	_mmc_priv
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _SDHCI_QUIRK_UNSTABLE_RO_DETECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SDHCI_QUIRK_UNSTABLE_RO_DETECT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
Lloh3:
	adrp	x20, _SAMPLE_COUNT@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SAMPLE_COUNT@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	w21, #0
	mov	w22, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #30
	bl	_msleep
	add	w22, w22, #1
	ldr	w8, [x20]
	cmp	w22, w8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_sdhci_check_ro
	cbz	w0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w21, w8, asr #1
	b.ge	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
	b	LBB0_3
LBB0_7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	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
	b	_sdhci_check_ro
LBB0_9:
	mov	w0, #1
LBB0_10:
	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 AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_QUIRK_UNSTABLE_RO_DETECT,4,2 ; @SDHCI_QUIRK_UNSTABLE_RO_DETECT
	.comm	_SAMPLE_COUNT,4,2               ; @SAMPLE_COUNT
	.no_dead_strip	_sdhci_get_ro
.subsections_via_symbols
