	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lbs_set_power_mgmt
_lbs_set_power_mgmt:                    ## @lbs_set_power_mgmt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edx, %ebx
	callq	_wiphy_priv
	movq	_FW_CAPINFO_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	cmpq	$0, 32(%rax)
	je	LBB0_6
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.7:
	movq	8(%rax), %rcx
	movq	_LBS802_11POWERMODECAM@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.8:
	movq	_LBS802_11POWERMODEMAX_PSP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rax)
	movq	24(%rax), %rcx
	movq	_LBS_CONNECTED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.9:
	movq	_PS_MODE_ACTION_ENTER_PS@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_10:
	movq	_LBS802_11POWERMODECAM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rax)
	movq	16(%rax), %rcx
	movq	_PS_STATE_FULL_POWER@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	cmpq	(%rdx), %rcx
	je	LBB0_13
## %bb.11:
	movq	_PS_MODE_ACTION_EXIT_PS@GOTPCREL(%rip), %rcx
LBB0_12:
	movl	(%rcx), %esi
	movq	%rax, %rdi
	movl	$1, %edx
	callq	_lbs_set_ps_mode
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FW_CAPINFO_PS,4,2              ## @FW_CAPINFO_PS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LBS802_11POWERMODECAM,8,3      ## @LBS802_11POWERMODECAM
	.comm	_PS_STATE_FULL_POWER,8,3        ## @PS_STATE_FULL_POWER
	.comm	_PS_MODE_ACTION_EXIT_PS,4,2     ## @PS_MODE_ACTION_EXIT_PS
	.comm	_LBS802_11POWERMODEMAX_PSP,8,3  ## @LBS802_11POWERMODEMAX_PSP
	.comm	_LBS_CONNECTED,8,3              ## @LBS_CONNECTED
	.comm	_PS_MODE_ACTION_ENTER_PS,4,2    ## @PS_MODE_ACTION_ENTER_PS
	.no_dead_strip	_lbs_set_power_mgmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lbs_set_power_mgmt
_lbs_set_power_mgmt:                    ; @lbs_set_power_mgmt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_wiphy_priv
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _FW_CAPINFO_PS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FW_CAPINFO_PS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_4
LBB0_2:
	cbz	w19, LBB0_11
; %bb.3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_4:
	cbz	w19, LBB0_8
; %bb.5:
	ldr	x8, [x0, #8]
Lloh6:
	adrp	x9, _LBS802_11POWERMODECAM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LBS802_11POWERMODECAM@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.6:
Lloh9:
	adrp	x8, _LBS802_11POWERMODEMAX_PSP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LBS802_11POWERMODEMAX_PSP@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x0, #8]
	ldr	x8, [x0, #24]
Lloh12:
	adrp	x9, _LBS_CONNECTED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _LBS_CONNECTED@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
Lloh15:
	adrp	x8, _PS_MODE_ACTION_ENTER_PS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PS_MODE_ACTION_ENTER_PS@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh17:
	adrp	x8, _LBS802_11POWERMODECAM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LBS802_11POWERMODECAM@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x0, #8]
	ldr	x8, [x0, #16]
Lloh20:
	adrp	x9, _PS_STATE_FULL_POWER@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PS_STATE_FULL_POWER@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.9:
Lloh23:
	adrp	x8, _PS_MODE_ACTION_EXIT_PS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PS_MODE_ACTION_EXIT_PS@GOTPAGEOFF]
LBB0_10:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_lbs_set_ps_mode
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_FW_CAPINFO_PS,4,2              ; @FW_CAPINFO_PS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LBS802_11POWERMODECAM,8,3      ; @LBS802_11POWERMODECAM
	.comm	_PS_STATE_FULL_POWER,8,3        ; @PS_STATE_FULL_POWER
	.comm	_PS_MODE_ACTION_EXIT_PS,4,2     ; @PS_MODE_ACTION_EXIT_PS
	.comm	_LBS802_11POWERMODEMAX_PSP,8,3  ; @LBS802_11POWERMODEMAX_PSP
	.comm	_LBS_CONNECTED,8,3              ; @LBS_CONNECTED
	.comm	_PS_MODE_ACTION_ENTER_PS,4,2    ; @PS_MODE_ACTION_ENTER_PS
	.no_dead_strip	_lbs_set_power_mgmt
.subsections_via_symbols
