	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moxart_wait_for_status
_moxart_wait_for_status:                ## @moxart_wait_for_status
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MAX_RETRIES@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_4
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, %rbx
	xorl	%r14d, %r14d
	movq	_REG_STATUS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movq	%rax, (%r12)
	andq	%rbx, %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$5, %edi
	callq	_udelay
	incq	%r14
	movq	_MAX_RETRIES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jl	LBB0_2
LBB0_4:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.5:
	negl	%ebx
	movl	(%r15), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	jmp	LBB0_8
LBB0_6:
	movq	_REG_CLEAR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%r15), %rsi
	movq	%rax, %rdi
	callq	_writel
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_MAX_RETRIES,8,3                ## @MAX_RETRIES
	.comm	_REG_STATUS,8,3                 ## @REG_STATUS
	.comm	_REG_CLEAR,8,3                  ## @REG_CLEAR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out waiting for status\n"

	.no_dead_strip	_moxart_wait_for_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moxart_wait_for_status
_moxart_wait_for_status:                ; @moxart_wait_for_status
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x23, _MAX_RETRIES@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MAX_RETRIES@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x24, #0
Lloh5:
	adrp	x25, _REG_STATUS@GOTPAGE
Lloh6:
	ldr	x25, [x25, _REG_STATUS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	str	x0, [x20]
	ands	x0, x0, x21
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #5
	bl	_udelay
	add	x24, x24, #1
	ldr	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_4:
	cbz	w22, LBB0_7
; %bb.5:
	neg	w20, w22
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_6:
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _REG_CLEAR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _REG_CLEAR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_MAX_RETRIES,8,3                ; @MAX_RETRIES
	.comm	_REG_STATUS,8,3                 ; @REG_STATUS
	.comm	_REG_CLEAR,8,3                  ; @REG_CLEAR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out waiting for status\n"

	.no_dead_strip	_moxart_wait_for_status
.subsections_via_symbols
