	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_sdio_buscoreprep
_brcmf_sdio_buscoreprep:                ## @brcmf_sdio_buscoreprep
	.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
	movl	$0, -44(%rbp)
	movq	_SBSDIO_FORCE_HW_CLKREQ_OFF@GOTPCREL(%rip), %r12
	movq	_SBSDIO_ALP_AVAIL_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%r12), %ebx
	movq	_SBSDIO_FUNC1_CHIPCLKCSR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rcx
	movl	%ebx, %edx
	callq	_brcmf_sdiod_writeb
	cmpl	$0, -44(%rbp)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_brcmf_err
	movl	-44(%rbp), %r14d
	jmp	LBB0_8
LBB0_2:
	movl	(%r13), %esi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_brcmf_sdiod_readb
	movq	_SBSDIO_AVBITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	cmpl	%ebx, %ecx
	jne	LBB0_5
## %bb.3:
	movl	(%r13), %esi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_brcmf_sdiod_readb
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_SBSDIO_ALPAV
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	movq	_PMU_MAX_TRANSITION_DLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SPINWAIT
	movl	%ebx, %edi
	callq	_SBSDIO_ALPAV
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	_SBSDIO_FORCE_ALP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r12), %edx
	movl	(%r13), %esi
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	callq	_brcmf_sdiod_writeb
	movl	$65, %edi
	callq	_udelay
	movq	_SBSDIO_FUNC1_SDIOPULLUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_brcmf_sdiod_writeb
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_brcmf_err
	movq	_EACCES@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_brcmf_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SBSDIO_FORCE_HW_CLKREQ_OFF,4,2 ## @SBSDIO_FORCE_HW_CLKREQ_OFF
	.comm	_SBSDIO_ALP_AVAIL_REQ,4,2       ## @SBSDIO_ALP_AVAIL_REQ
	.comm	_SBSDIO_FUNC1_CHIPCLKCSR,4,2    ## @SBSDIO_FUNC1_CHIPCLKCSR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error writing for HT off\n"

	.comm	_SBSDIO_AVBITS,4,2              ## @SBSDIO_AVBITS
L_.str.1:                               ## @.str.1
	.asciz	"ChipClkCSR access: wrote 0x%02x read 0x%02x\n"

	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_PMU_MAX_TRANSITION_DLY,4,2     ## @PMU_MAX_TRANSITION_DLY
L_.str.2:                               ## @.str.2
	.asciz	"timeout on ALPAV wait, clkval 0x%02x\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SBSDIO_FORCE_ALP,4,2           ## @SBSDIO_FORCE_ALP
	.comm	_SBSDIO_FUNC1_SDIOPULLUP,4,2    ## @SBSDIO_FUNC1_SDIOPULLUP
	.no_dead_strip	_brcmf_sdio_buscoreprep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_sdio_buscoreprep
_brcmf_sdio_buscoreprep:                ; @brcmf_sdio_buscoreprep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	str	wzr, [sp, #28]
Lloh0:
	adrp	x21, _SBSDIO_FORCE_HW_CLKREQ_OFF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SBSDIO_FORCE_HW_CLKREQ_OFF@GOTPAGEOFF]
Lloh2:
	adrp	x8, _SBSDIO_ALP_AVAIL_REQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SBSDIO_ALP_AVAIL_REQ@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh4:
	ldr	w8, [x8]
	orr	w20, w8, w9
Lloh5:
	adrp	x22, _SBSDIO_FUNC1_CHIPCLKCSR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SBSDIO_FUNC1_CHIPCLKCSR@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x3, sp, #28
	mov	x2, x20
	bl	_brcmf_sdiod_writeb
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_2
; %bb.1:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_brcmf_err
	ldr	w0, [sp, #28]
	b	LBB0_8
LBB0_2:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, #0
	bl	_brcmf_sdiod_readb
                                        ; kill: def $w0 killed $w0 def $x0
Lloh9:
	adrp	x8, _SBSDIO_AVBITS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SBSDIO_AVBITS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w8, w0, w8
	cmp	w8, w20
	b.ne	LBB0_5
; %bb.3:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, #0
	bl	_brcmf_sdiod_readb
	mov	x20, x0
	bl	_SBSDIO_ALPAV
	cmp	w0, #0
	cset	w0, eq
Lloh12:
	adrp	x8, _PMU_MAX_TRANSITION_DLY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PMU_MAX_TRANSITION_DLY@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_SPINWAIT
	mov	x0, x20
	bl	_SBSDIO_ALPAV
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w8, [x21]
Lloh15:
	adrp	x9, _SBSDIO_FORCE_ALP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SBSDIO_FORCE_ALP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w8
	ldr	w1, [x22]
	add	x3, sp, #28
	mov	x0, x19
	bl	_brcmf_sdiod_writeb
	mov	w0, #65
	bl	_udelay
Lloh18:
	adrp	x8, _SBSDIO_FUNC1_SDIOPULLUP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SBSDIO_FUNC1_SDIOPULLUP@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	bl	_brcmf_sdiod_writeb
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	stp	x20, x0, [sp]
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_brcmf_err
Lloh23:
	adrp	x8, _EACCES@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	str	x20, [sp]
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_brcmf_err
Lloh27:
	adrp	x8, _EBUSY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_SBSDIO_FORCE_HW_CLKREQ_OFF,4,2 ; @SBSDIO_FORCE_HW_CLKREQ_OFF
	.comm	_SBSDIO_ALP_AVAIL_REQ,4,2       ; @SBSDIO_ALP_AVAIL_REQ
	.comm	_SBSDIO_FUNC1_CHIPCLKCSR,4,2    ; @SBSDIO_FUNC1_CHIPCLKCSR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error writing for HT off\n"

	.comm	_SBSDIO_AVBITS,4,2              ; @SBSDIO_AVBITS
l_.str.1:                               ; @.str.1
	.asciz	"ChipClkCSR access: wrote 0x%02x read 0x%02x\n"

	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_PMU_MAX_TRANSITION_DLY,4,2     ; @PMU_MAX_TRANSITION_DLY
l_.str.2:                               ; @.str.2
	.asciz	"timeout on ALPAV wait, clkval 0x%02x\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SBSDIO_FORCE_ALP,4,2           ; @SBSDIO_FORCE_ALP
	.comm	_SBSDIO_FUNC1_SDIOPULLUP,4,2    ; @SBSDIO_FUNC1_SDIOPULLUP
	.no_dead_strip	_brcmf_sdio_buscoreprep
.subsections_via_symbols
