	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_cfg80211_host_sleep
_ath6kl_cfg80211_host_sleep:            ## @ath6kl_cfg80211_host_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_HOST_SLEEP_MODE_CMD_PROCESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %rsi
	callq	_clear_bit
	movl	24(%r14), %edi
	movl	(%rbx), %esi
	movq	_ATH6KL_HOST_MODE_ASLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ath6kl_wmi_set_host_sleep_mode_cmd
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_1
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	8(%r14), %r15d
	movq	%rbx, %rdi
	callq	_is_hsleep_mode_procsed
	movq	_WMI_TIMEOUT@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_wait_event_interruptible_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_ath6kl_warn
	movl	%ebx, %r15d
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_ath6kl_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_5:
	movq	(%r14), %rax
	movq	16(%r14), %rcx
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_10
## %bb.6:
	movl	8(%r14), %ebx
	movq	%r14, %rdi
	callq	_is_ctrl_ep_empty
	movl	(%r12), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_wait_event_interruptible_timeout
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	jns	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ath6kl_warn
	movl	%ebx, %r15d
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_ath6kl_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST_SLEEP_MODE_CMD_PROCESSED,4,2 ## @HOST_SLEEP_MODE_CMD_PROCESSED
	.comm	_ATH6KL_HOST_MODE_ASLEEP,4,2    ## @ATH6KL_HOST_MODE_ASLEEP
	.comm	_WMI_TIMEOUT,4,2                ## @WMI_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout, didn't get host sleep cmd processed event\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"error while waiting for host sleep cmd processed event %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"clear wmi ctrl data timeout\n"

L_.str.3:                               ## @.str.3
	.asciz	"clear wmi ctrl data failed: %d\n"

	.no_dead_strip	_ath6kl_cfg80211_host_sleep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_cfg80211_host_sleep
_ath6kl_cfg80211_host_sleep:            ; @ath6kl_cfg80211_host_sleep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _HOST_SLEEP_MODE_CMD_PROCESSED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HOST_SLEEP_MODE_CMD_PROCESSED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x1, #4
	bl	_clear_bit
	ldr	w0, [x19, #24]
	ldr	w1, [x21]
Lloh3:
	adrp	x8, _ATH6KL_HOST_MODE_ASLEEP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH6KL_HOST_MODE_ASLEEP@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_ath6kl_wmi_set_host_sleep_mode_cmd
	mov	x20, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
	ldr	w20, [x19, #8]
	mov	x0, x21
	bl	_is_hsleep_mode_procsed
	mov	x1, x0
Lloh6:
	adrp	x22, _WMI_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x22, [x22, _WMI_TIMEOUT@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_wait_event_interruptible_timeout
	cbz	w0, LBB0_5
; %bb.3:
	mov	x20, x0
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	w20, #0
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_warn
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_6:
	str	x20, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ath6kl_warn
LBB0_7:
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_1
; %bb.8:
	ldr	w21, [x19, #8]
	mov	x0, x19
	bl	_is_ctrl_ep_empty
	mov	x1, x0
	ldr	w2, [x22]
	mov	x0, x21
	bl	_wait_event_interruptible_timeout
	cbz	w0, LBB0_11
; %bb.9:
	mov	x19, x0
	tbz	w0, #31, LBB0_1
; %bb.10:
	str	x19, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ath6kl_warn
	mov	x20, x19
	b	LBB0_1
LBB0_11:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ath6kl_warn
Lloh19:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST_SLEEP_MODE_CMD_PROCESSED,4,2 ; @HOST_SLEEP_MODE_CMD_PROCESSED
	.comm	_ATH6KL_HOST_MODE_ASLEEP,4,2    ; @ATH6KL_HOST_MODE_ASLEEP
	.comm	_WMI_TIMEOUT,4,2                ; @WMI_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout, didn't get host sleep cmd processed event\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"error while waiting for host sleep cmd processed event %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"clear wmi ctrl data timeout\n"

l_.str.3:                               ; @.str.3
	.asciz	"clear wmi ctrl data failed: %d\n"

	.no_dead_strip	_ath6kl_cfg80211_host_sleep
.subsections_via_symbols
