	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1251_op_config
_wl1251_op_config:                      ## @wl1251_op_config
	.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	%esi, %r15d
	movq	%rdi, %r14
	movq	24(%rdi), %rax
	movq	32(%rdi), %r13
	movl	(%rax), %edi
	callq	_ieee80211_frequency_to_channel
	movl	%eax, %r12d
	movl	(%r14), %eax
	movq	_IEEE80211_CONF_MONITOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	leaq	L_.str.2(%rip), %rdx
	leaq	L_.str.1(%rip), %r8
	movq	%r8, %rcx
	cmoveq	%rdx, %rcx
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rsi
	movq	_IEEE80211_CONF_PS@GOTPCREL(%rip), %rdi
	andl	(%rdi), %eax
	movl	(%rsi), %edi
	cmoveq	%rdx, %r8
	movq	8(%r14), %r9
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_wl1251_debug
	leaq	32(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_wl1251_ps_elp_wakeup
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_31
## %bb.1:
	movq	_IEEE80211_CONF_CHANGE_MONITOR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.2:
	movq	_IEEE80211_CONF_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_4
## %bb.3:
	movl	$1, (%r13)
	movq	_DF_SNIFF_MODE_ENABLE@GOTPCREL(%rip), %rax
	movq	_DF_ENCRYPTION_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	jmp	LBB0_5
LBB0_4:
	movl	$0, (%r13)
	xorl	%esi, %esi
LBB0_5:
	movq	%r13, %rdi
	callq	_wl1251_acx_feature_cfg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_30
LBB0_6:
	cmpl	4(%r13), %r12d
	je	LBB0_11
## %bb.7:
	movl	%r12d, 4(%r13)
	cmpq	$0, 56(%r13)
	je	LBB0_9
## %bb.8:
	movl	44(%r13), %esi
	movl	36(%r13), %r8d
	movl	40(%r13), %ecx
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_wl1251_join
	jmp	LBB0_10
LBB0_9:
	movl	$0, 8(%r13)
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_wl1251_cmd_data_path_rx
LBB0_10:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_30
LBB0_11:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_wl1251_can_do_pm
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	cmpl	$0, 12(%r13)
	je	LBB0_18
LBB0_13:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_wl1251_can_do_pm
	testq	%rax, %rax
	je	LBB0_15
LBB0_19:
	movl	%r15d, %ecx
LBB0_20:
	movq	_IEEE80211_CONF_CHANGE_IDLE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_27
## %bb.21:
	cmpl	$0, 48(%r13)
	jne	LBB0_27
## %bb.22:
	movq	_IEEE80211_CONF_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_24
## %bb.23:
	movq	_STATION_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_wl1251_ps_set_mode
	jmp	LBB0_26
LBB0_15:
	cmpl	$0, 12(%r13)
	je	LBB0_19
## %bb.16:
	movq	_DEBUG_PSM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1251_debug
	movl	$0, 12(%r13)
	movq	_STATION_ACTIVE_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%rsi, 16(%r13)
	movl	%r15d, %ecx
	je	LBB0_20
## %bb.17:
	movq	%r13, %rdi
	callq	_wl1251_ps_set_mode
	movl	%r15d, %ecx
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_20
	jmp	LBB0_30
LBB0_18:
	movq	_DEBUG_PSM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1251_debug
	movl	$1, 12(%r13)
	movl	16(%r14), %edx
	movl	%edx, 36(%r13)
	movl	40(%r13), %esi
	movq	%r13, %rdi
	callq	_wl1251_acx_wr_tbtt_and_dtim
	movq	_STATION_POWER_SAVE_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_wl1251_ps_set_mode
	movl	%eax, %ebx
	testl	%eax, %eax
	movl	%r15d, %ecx
	jns	LBB0_20
	jmp	LBB0_30
LBB0_24:
	movq	_STATION_ACTIVE_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_wl1251_ps_set_mode
	testl	%eax, %eax
	js	LBB0_32
## %bb.25:
	movl	44(%r13), %esi
	movl	40(%r13), %ecx
	movl	4(%r13), %edx
	movl	36(%r13), %r8d
	movq	%r13, %rdi
	callq	_wl1251_join
LBB0_26:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_30
LBB0_27:
	movq	8(%r14), %rsi
	cmpq	24(%r13), %rsi
	je	LBB0_30
## %bb.28:
	movq	%r13, %rdi
	callq	_wl1251_acx_tx_power
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_30
## %bb.29:
	movq	8(%r14), %rax
	movq	%rax, 24(%r13)
LBB0_30:
	movq	%r13, %rdi
	callq	_wl1251_ps_elp_sleep
LBB0_31:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movl	%eax, %ebx
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_MAC80211,4,2             ## @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mac80211 config ch %d monitor %s psm %s power %d"

	.comm	_IEEE80211_CONF_MONITOR,4,2     ## @IEEE80211_CONF_MONITOR
L_.str.1:                               ## @.str.1
	.asciz	"on"

L_.str.2:                               ## @.str.2
	.asciz	"off"

	.comm	_IEEE80211_CONF_PS,4,2          ## @IEEE80211_CONF_PS
	.comm	_IEEE80211_CONF_CHANGE_MONITOR,4,2 ## @IEEE80211_CONF_CHANGE_MONITOR
	.comm	_DF_SNIFF_MODE_ENABLE,4,2       ## @DF_SNIFF_MODE_ENABLE
	.comm	_DF_ENCRYPTION_DISABLE,4,2      ## @DF_ENCRYPTION_DISABLE
	.comm	_DEBUG_PSM,4,2                  ## @DEBUG_PSM
L_.str.3:                               ## @.str.3
	.asciz	"psm enabled"

	.comm	_STATION_POWER_SAVE_MODE,8,3    ## @STATION_POWER_SAVE_MODE
L_.str.4:                               ## @.str.4
	.asciz	"psm disabled"

	.comm	_STATION_ACTIVE_MODE,8,3        ## @STATION_ACTIVE_MODE
	.comm	_IEEE80211_CONF_CHANGE_IDLE,4,2 ## @IEEE80211_CONF_CHANGE_IDLE
	.comm	_IEEE80211_CONF_IDLE,4,2        ## @IEEE80211_CONF_IDLE
	.comm	_STATION_IDLE,8,3               ## @STATION_IDLE
	.no_dead_strip	_wl1251_op_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1251_op_config
_wl1251_op_config:                      ; @wl1251_op_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x20, x0
	ldp	x8, x19, [x0, #24]
	ldr	w0, [x8]
	bl	_ieee80211_frequency_to_channel
	mov	x24, x0
Lloh0:
	adrp	x8, _DEBUG_MAC80211@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_MAC80211@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w8, [x20]
Lloh3:
	adrp	x25, _IEEE80211_CONF_MONITOR@GOTPAGE
Lloh4:
	ldr	x25, [x25, _IEEE80211_CONF_MONITOR@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh5:
	adrp	x10, l_.str.1@PAGE
Lloh6:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh7:
	adrp	x11, l_.str.2@PAGE
Lloh8:
	add	x11, x11, l_.str.2@PAGEOFF
	tst	w9, w8
	csel	x9, x11, x10, eq
Lloh9:
	adrp	x12, _IEEE80211_CONF_PS@GOTPAGE
Lloh10:
	ldr	x12, [x12, _IEEE80211_CONF_PS@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	tst	w12, w8
	csel	x8, x11, x10, eq
	ldr	x10, [x20, #8]
	stp	x8, x10, [sp, #16]
	stp	x24, x9, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1251_debug
	add	x21, x19, #32
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x19
	bl	_wl1251_ps_elp_wakeup
	mov	x23, x0
	tbnz	w0, #31, LBB0_27
; %bb.1:
Lloh14:
	adrp	x8, _IEEE80211_CONF_CHANGE_MONITOR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_MONITOR@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.2:
	ldr	w8, [x20]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	w8, #1
Lloh17:
	adrp	x9, _DF_SNIFF_MODE_ENABLE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DF_SNIFF_MODE_ENABLE@GOTPAGEOFF]
	str	w8, [x19]
Lloh19:
	ldr	w8, [x9]
Lloh20:
	adrp	x9, _DF_ENCRYPTION_DISABLE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DF_ENCRYPTION_DISABLE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w1, w9, w8
	b	LBB0_5
LBB0_4:
	mov	w1, #0
	str	wzr, [x19]
LBB0_5:
	mov	x0, x19
	bl	_wl1251_acx_feature_cfg
	mov	x23, x0
	tbnz	w0, #31, LBB0_26
LBB0_6:
	ldr	w8, [x19, #4]
	cmp	w24, w8
	b.eq	LBB0_10
; %bb.7:
	str	w24, [x19, #4]
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_9
; %bb.8:
	ldp	w3, w1, [x19, #40]
	ldr	w4, [x19, #36]
	mov	x0, x19
	mov	x2, x24
	bl	_wl1251_join
	mov	x23, x0
	tbz	w0, #31, LBB0_10
	b	LBB0_26
LBB0_9:
	str	wzr, [x19, #8]
	mov	x0, x19
	mov	x1, x24
	mov	w2, #1
	bl	_wl1251_cmd_data_path_rx
	mov	x23, x0
	tbnz	w0, #31, LBB0_26
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	bl	_wl1251_can_do_pm
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_15
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_wl1251_can_do_pm
	cbnz	x0, LBB0_17
; %bb.13:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_17
; %bb.14:
Lloh23:
	adrp	x8, _DEBUG_PSM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DEBUG_PSM@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wl1251_debug
	str	wzr, [x19, #12]
	ldr	x8, [x19, #16]
Lloh28:
	adrp	x9, _STATION_ACTIVE_MODE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _STATION_ACTIVE_MODE@GOTPAGEOFF]
Lloh30:
	ldr	x1, [x9]
	cmp	x8, x1
	b.ne	LBB0_16
	b	LBB0_17
LBB0_15:
Lloh31:
	adrp	x8, _DEBUG_PSM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DEBUG_PSM@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wl1251_debug
	mov	w8, #1
	str	w8, [x19, #12]
	ldr	w2, [x20, #16]
	str	w2, [x19, #36]
	ldr	w1, [x19, #40]
	mov	x0, x19
	bl	_wl1251_acx_wr_tbtt_and_dtim
Lloh36:
	adrp	x8, _STATION_POWER_SAVE_MODE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _STATION_POWER_SAVE_MODE@GOTPAGEOFF]
Lloh38:
	ldr	x1, [x8]
LBB0_16:
	mov	x0, x19
	bl	_wl1251_ps_set_mode
	mov	x23, x0
	tbnz	w0, #31, LBB0_26
LBB0_17:
Lloh39:
	adrp	x8, _IEEE80211_CONF_CHANGE_IDLE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_IDLE@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_23
; %bb.18:
	ldr	w8, [x19, #48]
	cbnz	w8, LBB0_23
; %bb.19:
	ldr	w8, [x20]
Lloh42:
	adrp	x9, _IEEE80211_CONF_IDLE@GOTPAGE
Lloh43:
	ldr	x9, [x9, _IEEE80211_CONF_IDLE@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
Lloh45:
	adrp	x8, _STATION_IDLE@GOTPAGE
Lloh46:
	ldr	x8, [x8, _STATION_IDLE@GOTPAGEOFF]
Lloh47:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_wl1251_ps_set_mode
	mov	x23, x0
	tbz	w0, #31, LBB0_23
	b	LBB0_26
LBB0_21:
Lloh48:
	adrp	x8, _STATION_ACTIVE_MODE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _STATION_ACTIVE_MODE@GOTPAGEOFF]
Lloh50:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_wl1251_ps_set_mode
	tbnz	w0, #31, LBB0_28
; %bb.22:
	ldp	w3, w1, [x19, #40]
	ldr	w2, [x19, #4]
	ldr	w4, [x19, #36]
	mov	x0, x19
	bl	_wl1251_join
	mov	x23, x0
	tbnz	w0, #31, LBB0_26
LBB0_23:
	ldr	x1, [x20, #8]
	ldr	x8, [x19, #24]
	cmp	x1, x8
	b.eq	LBB0_26
; %bb.24:
	mov	x0, x19
	bl	_wl1251_acx_tx_power
	mov	x23, x0
	tbnz	w0, #31, LBB0_26
; %bb.25:
	ldr	x8, [x20, #8]
	str	x8, [x19, #24]
LBB0_26:
	mov	x0, x19
	bl	_wl1251_ps_elp_sleep
LBB0_27:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_28:
	mov	x23, x0
	b	LBB0_26
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_MAC80211,4,2             ; @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac80211 config ch %d monitor %s psm %s power %d"

	.comm	_IEEE80211_CONF_MONITOR,4,2     ; @IEEE80211_CONF_MONITOR
l_.str.1:                               ; @.str.1
	.asciz	"on"

l_.str.2:                               ; @.str.2
	.asciz	"off"

	.comm	_IEEE80211_CONF_PS,4,2          ; @IEEE80211_CONF_PS
	.comm	_IEEE80211_CONF_CHANGE_MONITOR,4,2 ; @IEEE80211_CONF_CHANGE_MONITOR
	.comm	_DF_SNIFF_MODE_ENABLE,4,2       ; @DF_SNIFF_MODE_ENABLE
	.comm	_DF_ENCRYPTION_DISABLE,4,2      ; @DF_ENCRYPTION_DISABLE
	.comm	_DEBUG_PSM,4,2                  ; @DEBUG_PSM
l_.str.3:                               ; @.str.3
	.asciz	"psm enabled"

	.comm	_STATION_POWER_SAVE_MODE,8,3    ; @STATION_POWER_SAVE_MODE
l_.str.4:                               ; @.str.4
	.asciz	"psm disabled"

	.comm	_STATION_ACTIVE_MODE,8,3        ; @STATION_ACTIVE_MODE
	.comm	_IEEE80211_CONF_CHANGE_IDLE,4,2 ; @IEEE80211_CONF_CHANGE_IDLE
	.comm	_IEEE80211_CONF_IDLE,4,2        ; @IEEE80211_CONF_IDLE
	.comm	_STATION_IDLE,8,3               ; @STATION_IDLE
	.no_dead_strip	_wl1251_op_config
.subsections_via_symbols
