	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_sdio_bus_sleep
_brcmf_sdio_bus_sleep:                  ## @brcmf_sdio_bus_sleep
	.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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	$0, -44(%rbp)
	movq	_SDIO@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	testl	%esi, %esi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	movq	%rcx, %r15
	cmoveq	%rax, %r15
	cmpl	$0, (%rbx)
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_brcmf_dbg
	cmpq	$0, 8(%rbx)
	je	LBB0_9
## %bb.1:
	cmpl	%r14d, (%rbx)
	je	LBB0_9
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.3:
	movl	16(%rbx), %edi
	movq	_SBSDIO_FUNC1_CHIPCLKCSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_brcmf_sdiod_readb
	movq	_SBSDIO_CSR_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.4:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movl	16(%rbx), %edi
	movq	_SBSDIO_FUNC1_CHIPCLKCSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SBSDIO_ALP_AVAIL_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	callq	_brcmf_sdiod_writeb
LBB0_5:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	jmp	LBB0_7
LBB0_6:
	movq	%rbx, %rdi
	movl	$1, %esi
LBB0_7:
	callq	_brcmf_sdio_kso_control
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	callq	_brcmf_err
	jmp	LBB0_14
LBB0_9:
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.10:
	cmpq	$0, 8(%rbx)
	jne	LBB0_13
## %bb.11:
	movq	_CLK_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_brcmf_sdio_clkctl
	jmp	LBB0_13
LBB0_12:
	movq	_CLK_AVAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_brcmf_sdio_clkctl
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_brcmf_sdio_wd_timer
LBB0_13:
	movl	%r14d, (%rbx)
	movl	(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_brcmf_dbg
LBB0_14:
	movl	(%r13), %edi
	movl	-44(%rbp), %edx
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movl	-44(%rbp), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDIO,4,2                       ## @SDIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter: request %s currently %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"SLEEP"

L_.str.2:                               ## @.str.2
	.asciz	"WAKE"

	.comm	_SBSDIO_FUNC1_CHIPCLKCSR,4,2    ## @SBSDIO_FUNC1_CHIPCLKCSR
	.comm	_SBSDIO_CSR_MASK,4,2            ## @SBSDIO_CSR_MASK
L_.str.3:                               ## @.str.3
	.asciz	"no clock, set ALP\n"

	.comm	_SBSDIO_ALP_AVAIL_REQ,4,2       ## @SBSDIO_ALP_AVAIL_REQ
L_.str.4:                               ## @.str.4
	.asciz	"error while changing bus sleep state %d\n"

	.comm	_CLK_NONE,4,2                   ## @CLK_NONE
	.comm	_CLK_AVAIL,4,2                  ## @CLK_AVAIL
L_.str.5:                               ## @.str.5
	.asciz	"new state %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"Exit: err=%d\n"

	.no_dead_strip	_brcmf_sdio_bus_sleep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_sdio_bus_sleep
_brcmf_sdio_bus_sleep:                  ; @brcmf_sdio_bus_sleep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	str	wzr, [sp, #28]
Lloh0:
	adrp	x22, _SDIO@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SDIO@GOTPAGEOFF]
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
	ldr	w0, [x22]
	cmp	w1, #0
	csel	x23, x9, x8, eq
	ldr	w10, [x20]
	cmp	w10, #0
	csel	x8, x9, x8, eq
	stp	x23, x8, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_9
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w19
	b.eq	LBB0_9
; %bb.2:
	cbz	w19, LBB0_6
; %bb.3:
	ldr	w0, [x20, #16]
Lloh8:
	adrp	x24, _SBSDIO_FUNC1_CHIPCLKCSR@GOTPAGE
Lloh9:
	ldr	x24, [x24, _SBSDIO_FUNC1_CHIPCLKCSR@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #28
	bl	_brcmf_sdiod_readb
Lloh10:
	adrp	x8, _SBSDIO_CSR_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SBSDIO_CSR_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x22]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_brcmf_dbg
	ldr	w0, [x20, #16]
	ldr	w1, [x24]
Lloh15:
	adrp	x8, _SBSDIO_ALP_AVAIL_REQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SBSDIO_ALP_AVAIL_REQ@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	add	x3, sp, #28
	bl	_brcmf_sdiod_writeb
LBB0_5:
	mov	x0, x20
	mov	w1, #0
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	mov	w1, #1
LBB0_7:
	bl	_brcmf_sdio_kso_control
	mov	x1, x0
	str	w0, [sp, #28]
	cbz	w0, LBB0_9
; %bb.8:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_brcmf_err
	b	LBB0_14
LBB0_9:
	cbz	w19, LBB0_12
; %bb.10:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_13
; %bb.11:
Lloh20:
	adrp	x8, _CLK_NONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CLK_NONE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_brcmf_sdio_clkctl
	b	LBB0_13
LBB0_12:
Lloh23:
	adrp	x8, _CLK_AVAIL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CLK_AVAIL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_brcmf_sdio_clkctl
	mov	x0, x20
	mov	w1, #1
	bl	_brcmf_sdio_wd_timer
LBB0_13:
	str	w19, [x20]
	ldr	w0, [x22]
	str	x23, [sp]
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_brcmf_dbg
LBB0_14:
	ldr	w0, [x22]
	ldr	w8, [sp, #28]
	str	x8, [sp]
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_brcmf_dbg
	ldr	w0, [sp, #28]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_SDIO,4,2                       ; @SDIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter: request %s currently %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"SLEEP"

l_.str.2:                               ; @.str.2
	.asciz	"WAKE"

	.comm	_SBSDIO_FUNC1_CHIPCLKCSR,4,2    ; @SBSDIO_FUNC1_CHIPCLKCSR
	.comm	_SBSDIO_CSR_MASK,4,2            ; @SBSDIO_CSR_MASK
l_.str.3:                               ; @.str.3
	.asciz	"no clock, set ALP\n"

	.comm	_SBSDIO_ALP_AVAIL_REQ,4,2       ; @SBSDIO_ALP_AVAIL_REQ
l_.str.4:                               ; @.str.4
	.asciz	"error while changing bus sleep state %d\n"

	.comm	_CLK_NONE,4,2                   ; @CLK_NONE
	.comm	_CLK_AVAIL,4,2                  ; @CLK_AVAIL
l_.str.5:                               ; @.str.5
	.asciz	"new state %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"Exit: err=%d\n"

	.no_dead_strip	_brcmf_sdio_bus_sleep
.subsections_via_symbols
