	.file	"extr_sdhci.c_sdhci_get_ro.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sdhci_get_ro, @function
sdhci_get_ro:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	mmc_priv@PLT
	mov	r12, rax
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR SDHCI_QUIRK_UNSTABLE_RO_DETECT[rip], eax
	je	.L2
	mov	eax, DWORD PTR SAMPLE_COUNT[rip]
	xor	ebp, ebp
	xor	ebx, ebx
	test	eax, eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, r12
	call	sdhci_check_ro@PLT
	test	eax, eax
	je	.L5
	mov	edx, DWORD PTR SAMPLE_COUNT[rip]
	add	ebp, 1
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	cmp	eax, ebp
	jl	.L8
.L5:
	mov	edi, 30
	add	ebx, 1
	call	msleep@PLT
	cmp	DWORD PTR SAMPLE_COUNT[rip], ebx
	jg	.L3
.L4:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	sdhci_check_ro@PLT
	.cfi_endproc
.LFE0:
	.size	sdhci_get_ro, .-sdhci_get_ro
	.comm	SDHCI_QUIRK_UNSTABLE_RO_DETECT,4,4
	.comm	SAMPLE_COUNT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sdhci.c_sdhci_get_ro.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sdhci_get_ro, %function
sdhci_get_ro:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	bl	mmc_priv
	ldr	r3, .L15
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L2
	ldr	r6, .L15+4
	ldr	r3, [r6]
	cmp	r3, #0
	movgt	r5, #0
	movgt	r7, r0
	movgt	r4, r5
	ble	.L4
.L3:
	mov	r0, r7
	bl	sdhci_check_ro
	cmp	r0, #0
	add	r4, r4, #1
	beq	.L5
	ldr	r3, [r6]
	add	r5, r5, #1
	add	r3, r3, r3, lsr #31
	cmp	r5, r3, asr #1
	bgt	.L8
.L5:
	mov	r0, #30
	bl	msleep
	ldr	r3, [r6]
	cmp	r3, r4
	bgt	.L3
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	pop	{r4, r5, r6, r7, r8, lr}
	b	sdhci_check_ro
.L16:
	.align	2
.L15:
	.word	SDHCI_QUIRK_UNSTABLE_RO_DETECT
	.word	SAMPLE_COUNT
	.size	sdhci_get_ro, .-sdhci_get_ro
	.comm	SDHCI_QUIRK_UNSTABLE_RO_DETECT,4,4
	.comm	SAMPLE_COUNT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
