	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_set_host_sleep_mode_cmd ## -- Begin function ath6kl_wmi_set_host_sleep_mode_cmd
	.p2align	4, 0x90
_ath6kl_wmi_set_host_sleep_mode_cmd:    ## @ath6kl_wmi_set_host_sleep_mode_cmd
	.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, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_ATH6KL_HOST_MODE_ASLEEP@GOTPCREL(%rip), %r13
	cmpl	%edx, (%r13)
	je	LBB0_3
## %bb.1:
	movq	_ATH6KL_HOST_MODE_AWAKE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_ath6kl_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movl	$16, %edi
	callq	_ath6kl_wmi_get_new_buf
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r12
	movq	(%rax), %rax
	cmpl	%ebx, (%r13)
	movq	%rax, %rbx
	jne	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_ath6kl_wmi_relinquish_implicit_pstream_credits
	movl	$1, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	jmp	LBB0_9
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$1, %edi
	callq	_cpu_to_le32
	movq	%rax, (%rbx)
LBB0_9:
	movq	_WMI_SET_HOST_SLEEP_MODE_CMDID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NO_SYNC_WMIFLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath6kl_wmi_cmd_send            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_HOST_MODE_ASLEEP,4,2    ## @ATH6KL_HOST_MODE_ASLEEP
	.comm	_ATH6KL_HOST_MODE_AWAKE,4,2     ## @ATH6KL_HOST_MODE_AWAKE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid host sleep mode: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WMI_SET_HOST_SLEEP_MODE_CMDID,4,2 ## @WMI_SET_HOST_SLEEP_MODE_CMDID
	.comm	_NO_SYNC_WMIFLAG,4,2            ## @NO_SYNC_WMIFLAG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_set_host_sleep_mode_cmd ; -- Begin function ath6kl_wmi_set_host_sleep_mode_cmd
	.p2align	2
_ath6kl_wmi_set_host_sleep_mode_cmd:    ; @ath6kl_wmi_set_host_sleep_mode_cmd
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
Lloh0:
	adrp	x24, _ATH6KL_HOST_MODE_ASLEEP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ATH6KL_HOST_MODE_ASLEEP@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x9, _ATH6KL_HOST_MODE_AWAKE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATH6KL_HOST_MODE_AWAKE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w2
	ccmp	w9, w2, #4, ne
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w0, #16
	bl	_ath6kl_wmi_get_new_buf
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	x23, [x0]
	ldr	w8, [x24]
	cmp	w8, w22
	b.ne	LBB0_7
; %bb.3:
	mov	x0, x20
	bl	_ath6kl_wmi_relinquish_implicit_pstream_credits
	mov	w0, #1
	bl	_cpu_to_le32
	str	x0, [x23, #8]
	b	LBB0_8
LBB0_4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_ath6kl_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w0, #1
	bl	_cpu_to_le32
	str	x0, [x23]
LBB0_8:
Lloh11:
	adrp	x8, _WMI_SET_HOST_SLEEP_MODE_CMDID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WMI_SET_HOST_SLEEP_MODE_CMDID@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x8, _NO_SYNC_WMIFLAG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NO_SYNC_WMIFLAG@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ath6kl_wmi_cmd_send
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_HOST_MODE_ASLEEP,4,2    ; @ATH6KL_HOST_MODE_ASLEEP
	.comm	_ATH6KL_HOST_MODE_AWAKE,4,2     ; @ATH6KL_HOST_MODE_AWAKE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid host sleep mode: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WMI_SET_HOST_SLEEP_MODE_CMDID,4,2 ; @WMI_SET_HOST_SLEEP_MODE_CMDID
	.comm	_NO_SYNC_WMIFLAG,4,2            ; @NO_SYNC_WMIFLAG
.subsections_via_symbols
