	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbs_set_host_sleep             ## -- Begin function lbs_set_host_sleep
	.p2align	4, 0x90
_lbs_set_host_sleep:                    ## @lbs_set_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	testl	%esi, %esi
	je	LBB0_9
## %bb.1:
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.11:
	movl	16(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_12
LBB0_9:
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movq	_EHS_REMOVE_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lbs_host_sleep_cfg             ## TAILCALL
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_2:
	leaq	-32(%rbp), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	24(%rbx), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lbs_host_sleep_cfg
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_netdev_info
	movl	%r15d, %r14d
	jmp	LBB0_13
LBB0_4:
	movq	8(%rbx), %rax
	movq	_PS_STATE_FULL_POWER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	_CMD_802_11_HOST_SLEEP_ACTIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_lbs_ret_host_sleep_activate@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-32(%rbp), %rdx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	$4, %ecx
	xorl	%r9d, %r9d
	callq	___lbs_cmd
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_netdev_info
	movl	%r15d, %r14d
LBB0_7:
	movl	(%rbx), %esi
	movl	20(%rbx), %edi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_interruptible_timeout
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movl	16(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_err
	movl	$-1, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EHS_REMOVE_WAKEUP,4,2          ## @EHS_REMOVE_WAKEUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Host sleep configuration failed: %d\n"

	.comm	_PS_STATE_FULL_POWER,8,3        ## @PS_STATE_FULL_POWER
	.comm	_CMD_802_11_HOST_SLEEP_ACTIVATE,4,2 ## @CMD_802_11_HOST_SLEEP_ACTIVATE
	.comm	_lbs_ret_host_sleep_activate,4,2 ## @lbs_ret_host_sleep_activate
L_.str.1:                               ## @.str.1
	.asciz	"HOST_SLEEP_ACTIVATE failed: %d\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.2:                               ## @.str.2
	.asciz	"host_sleep_q: timer expired\n"

L_.str.3:                               ## @.str.3
	.asciz	"host sleep: already enabled\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbs_set_host_sleep             ; -- Begin function lbs_set_host_sleep
	.p2align	2
_lbs_set_host_sleep:                    ; @lbs_set_host_sleep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w1, LBB0_3
; %bb.1:
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.2:
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x1, l_.str.3@PAGE
Lloh1:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_netdev_err
	b	LBB0_5
LBB0_3:
	cbz	w8, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _EHS_REMOVE_WAKEUP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EHS_REMOVE_WAKEUP@GOTPAGEOFF]
Lloh4:
	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
	add	sp, sp, #48
	b	_lbs_host_sleep_cfg
LBB0_5:
	mov	w20, #0
	b	LBB0_14
LBB0_6:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w1, [x19, #24]
	mov	x0, x19
	mov	x2, #0
	bl	_lbs_host_sleep_cfg
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_netdev_info
	b	LBB0_14
LBB0_8:
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x9, _PS_STATE_FULL_POWER@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PS_STATE_FULL_POWER@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
Lloh10:
	adrp	x8, _CMD_802_11_HOST_SLEEP_ACTIVATE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CMD_802_11_HOST_SLEEP_ACTIVATE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _lbs_ret_host_sleep_activate@GOTPAGE
Lloh14:
	ldr	x8, [x8, _lbs_ret_host_sleep_activate@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #4
	mov	w5, #0
	bl	___lbs_cmd
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.10:
	ldr	w0, [x19, #16]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_netdev_info
	b	LBB0_12
LBB0_11:
	mov	w20, #0
LBB0_12:
	ldr	w0, [x19, #20]
	ldr	w1, [x19]
Lloh18:
	adrp	x8, _HZ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #2
	lsl	w2, w8, #1
	bl	_wait_event_interruptible_timeout
	cbnz	w0, LBB0_14
; %bb.13:
	ldr	w0, [x19, #16]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
	mov	w20, #-1
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EHS_REMOVE_WAKEUP,4,2          ; @EHS_REMOVE_WAKEUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Host sleep configuration failed: %d\n"

	.comm	_PS_STATE_FULL_POWER,8,3        ; @PS_STATE_FULL_POWER
	.comm	_CMD_802_11_HOST_SLEEP_ACTIVATE,4,2 ; @CMD_802_11_HOST_SLEEP_ACTIVATE
	.comm	_lbs_ret_host_sleep_activate,4,2 ; @lbs_ret_host_sleep_activate
l_.str.1:                               ; @.str.1
	.asciz	"HOST_SLEEP_ACTIVATE failed: %d\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.2:                               ; @.str.2
	.asciz	"host_sleep_q: timer expired\n"

l_.str.3:                               ; @.str.3
	.asciz	"host sleep: already enabled\n"

.subsections_via_symbols
