	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_bcm_kona_sd_reset
_sdhci_bcm_kona_sd_reset:               ## @sdhci_bcm_kona_sd_reset
	.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
	movq	%rdi, %r14
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	$100, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r15, %rbx
	movq	_KONA_SDHOST_CORECTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_sdhci_readl
	movq	_KONA_SDHOST_RESET@GOTPCREL(%rip), %r12
	orl	(%r12), %eax
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_sdhci_writel
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_sdhci_readl
	testl	%eax, (%r12)
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_time_is_before_jiffies
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_4:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_sdhci_readl
	movl	(%r12), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_usleep_range
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_sdhci_writel
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_KONA_SDHOST_CORECTRL,4,2       ## @KONA_SDHOST_CORECTRL
	.comm	_KONA_SDHOST_RESET,4,2          ## @KONA_SDHOST_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: sd host is stuck in reset!!!\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_sdhci_bcm_kona_sd_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_bcm_kona_sd_reset
_sdhci_bcm_kona_sd_reset:               ; @sdhci_bcm_kona_sd_reset
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	mov	w0, #100
	bl	_msecs_to_jiffies
	add	x20, x0, x20
Lloh3:
	adrp	x21, _KONA_SDHOST_CORECTRL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _KONA_SDHOST_CORECTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdhci_readl
Lloh5:
	adrp	x22, _KONA_SDHOST_RESET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _KONA_SDHOST_RESET@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w1, w8, w0
	ldr	w2, [x21]
	mov	x0, x19
	bl	_sdhci_writel
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdhci_readl
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_time_is_before_jiffies
	cbz	x0, LBB0_1
; %bb.3:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh9:
	adrp	x8, _EFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdhci_readl
	ldr	w8, [x22]
	bic	w20, w0, w8
	mov	w0, #1000
	mov	w1, #5000
	bl	_usleep_range
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_writel
	mov	w0, #0
LBB0_5:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_KONA_SDHOST_CORECTRL,4,2       ; @KONA_SDHOST_CORECTRL
	.comm	_KONA_SDHOST_RESET,4,2          ; @KONA_SDHOST_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: sd host is stuck in reset!!!\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_sdhci_bcm_kona_sd_reset
.subsections_via_symbols
