	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_sdio_suspend
_ath6kl_sdio_suspend:                   ## @ath6kl_sdio_suspend
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_ath6kl_sdio_priv
	movq	(%rax), %r14
	movq	(%r15), %rax
	movq	_WLAN_POWER_STATE_WOW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	testq	%rax, %rax
	jne	LBB0_3
LBB0_4:
	movq	%r15, %rdi
	callq	_ath6kl_set_sdio_pm_caps
	testl	%eax, %eax
	jne	LBB0_18
## %bb.5:
	movq	_ATH6KL_CFG_SUSPEND_WOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_ath6kl_cfg80211_suspend
	testl	%eax, %eax
	je	LBB0_22
## %bb.6:
	movq	_ENOTCONN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_ath6kl_err
LBB0_8:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.9:
	movq	_WLAN_POWER_STATE_DEEP_SLEEP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	je	LBB0_13
## %bb.10:
	movq	_WLAN_POWER_STATE_CUT_PWR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
	jmp	LBB0_18
LBB0_3:
	movq	_WLAN_POWER_STATE_DEEP_SLEEP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_11:
	movq	(%r15), %rcx
	cmpq	%rax, %rcx
	je	LBB0_13
## %bb.12:
	testq	%rcx, %rcx
	jne	LBB0_18
LBB0_13:
	movq	%r14, %rdi
	callq	_sdio_get_host_pm_caps
	movl	%eax, %ebx
	movq	_MMC_PM_KEEP_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %esi
	je	LBB0_18
## %bb.14:
	movq	%r14, %rdi
	callq	_sdio_set_host_pm_flags
	testl	%eax, %eax
	je	LBB0_15
LBB0_18:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	_MMC_PM_KEEP_POWER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, (%rax)
LBB0_21:
	movq	_ATH6KL_CFG_SUSPEND_CUTPOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath6kl_cfg80211_suspend        ## TAILCALL
LBB0_15:
	movq	_MMC_PM_WAKE_SDIO_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %esi
	je	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	callq	_sdio_set_host_pm_flags
	testl	%eax, %eax
	jne	LBB0_18
LBB0_17:
	movq	_ATH6KL_CFG_SUSPEND_DEEPSLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_ath6kl_cfg80211_suspend
	testl	%eax, %eax
	jne	LBB0_18
LBB0_22:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WLAN_POWER_STATE_WOW,8,3       ## @WLAN_POWER_STATE_WOW
	.comm	_ATH6KL_CFG_SUSPEND_WOW,4,2     ## @ATH6KL_CFG_SUSPEND_WOW
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wow suspend failed: %d\n"

	.comm	_WLAN_POWER_STATE_DEEP_SLEEP,8,3 ## @WLAN_POWER_STATE_DEEP_SLEEP
	.comm	_WLAN_POWER_STATE_CUT_PWR,8,3   ## @WLAN_POWER_STATE_CUT_PWR
	.comm	_MMC_PM_KEEP_POWER,4,2          ## @MMC_PM_KEEP_POWER
	.comm	_MMC_PM_WAKE_SDIO_IRQ,4,2       ## @MMC_PM_WAKE_SDIO_IRQ
	.comm	_ATH6KL_CFG_SUSPEND_DEEPSLEEP,4,2 ## @ATH6KL_CFG_SUSPEND_DEEPSLEEP
	.comm	_ATH6KL_CFG_SUSPEND_CUTPOWER,4,2 ## @ATH6KL_CFG_SUSPEND_CUTPOWER
	.no_dead_strip	_ath6kl_sdio_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_sdio_suspend
_ath6kl_sdio_suspend:                   ; @ath6kl_sdio_suspend
	.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	x21, x1
	mov	x19, x0
	bl	_ath6kl_sdio_priv
	ldr	x20, [x0]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _WLAN_POWER_STATE_WOW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WLAN_POWER_STATE_WOW@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.1:
	cbz	x21, LBB0_10
; %bb.2:
	cbnz	x8, LBB0_10
LBB0_3:
	mov	x0, x19
	bl	_ath6kl_set_sdio_pm_caps
	cbnz	w0, LBB0_14
; %bb.4:
Lloh3:
	adrp	x8, _ATH6KL_CFG_SUSPEND_WOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH6KL_CFG_SUSPEND_WOW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_ath6kl_cfg80211_suspend
	cbz	w0, LBB0_21
; %bb.5:
	mov	x1, x0
Lloh6:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_7
; %bb.6:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_err
LBB0_7:
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_12
; %bb.8:
Lloh11:
	adrp	x8, _WLAN_POWER_STATE_DEEP_SLEEP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WLAN_POWER_STATE_DEEP_SLEEP@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_12
; %bb.9:
Lloh14:
	adrp	x10, _WLAN_POWER_STATE_CUT_PWR@GOTPAGE
Lloh15:
	ldr	x10, [x10, _WLAN_POWER_STATE_CUT_PWR@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
	b	LBB0_14
LBB0_10:
Lloh17:
	adrp	x8, _WLAN_POWER_STATE_DEEP_SLEEP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WLAN_POWER_STATE_DEEP_SLEEP@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
LBB0_11:
	ldr	x9, [x19]
	cmp	x9, x8
	ccmp	x9, #0, #4, ne
	b.ne	LBB0_14
LBB0_12:
	mov	x0, x20
	bl	_sdio_get_host_pm_caps
Lloh20:
	adrp	x8, _MMC_PM_KEEP_POWER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MMC_PM_KEEP_POWER@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	tst	w1, w0
	b.eq	LBB0_14
; %bb.13:
	mov	x21, x0
	mov	x0, x20
	bl	_sdio_set_host_pm_flags
	cbz	w0, LBB0_18
LBB0_14:
	ldr	x8, [x20]
	cbz	x8, LBB0_17
; %bb.15:
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.16:
Lloh23:
	adrp	x9, _MMC_PM_KEEP_POWER@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MMC_PM_KEEP_POWER@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	ldr	w10, [x8]
	bic	w9, w10, w9
	str	w9, [x8]
LBB0_17:
Lloh26:
	adrp	x8, _ATH6KL_CFG_SUSPEND_CUTPOWER@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ATH6KL_CFG_SUSPEND_CUTPOWER@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	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
	b	_ath6kl_cfg80211_suspend
LBB0_18:
Lloh29:
	adrp	x8, _MMC_PM_WAKE_SDIO_IRQ@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MMC_PM_WAKE_SDIO_IRQ@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	tst	w1, w21
	b.eq	LBB0_20
; %bb.19:
	mov	x0, x20
	bl	_sdio_set_host_pm_flags
	cbnz	w0, LBB0_14
LBB0_20:
Lloh32:
	adrp	x8, _ATH6KL_CFG_SUSPEND_DEEPSLEEP@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ATH6KL_CFG_SUSPEND_DEEPSLEEP@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_ath6kl_cfg80211_suspend
	cbnz	w0, LBB0_14
LBB0_21:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_WLAN_POWER_STATE_WOW,8,3       ; @WLAN_POWER_STATE_WOW
	.comm	_ATH6KL_CFG_SUSPEND_WOW,4,2     ; @ATH6KL_CFG_SUSPEND_WOW
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wow suspend failed: %d\n"

	.comm	_WLAN_POWER_STATE_DEEP_SLEEP,8,3 ; @WLAN_POWER_STATE_DEEP_SLEEP
	.comm	_WLAN_POWER_STATE_CUT_PWR,8,3   ; @WLAN_POWER_STATE_CUT_PWR
	.comm	_MMC_PM_KEEP_POWER,4,2          ; @MMC_PM_KEEP_POWER
	.comm	_MMC_PM_WAKE_SDIO_IRQ,4,2       ; @MMC_PM_WAKE_SDIO_IRQ
	.comm	_ATH6KL_CFG_SUSPEND_DEEPSLEEP,4,2 ; @ATH6KL_CFG_SUSPEND_DEEPSLEEP
	.comm	_ATH6KL_CFG_SUSPEND_CUTPOWER,4,2 ; @ATH6KL_CFG_SUSPEND_CUTPOWER
	.no_dead_strip	_ath6kl_sdio_suspend
.subsections_via_symbols
