	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x0_config                  ## -- Begin function mt76x0_config
	.p2align	4, 0x90
_mt76x0_config:                         ## @mt76x0_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_IEEE80211_CONF_CHANGE_CHANNEL@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_ieee80211_stop_queues
	leaq	8(%rbx), %rsi
	movq	%r15, %rdi
	callq	_mt76x0_set_channel
	movq	%rbx, %rdi
	callq	_ieee80211_wake_queues
LBB0_2:
	movq	_IEEE80211_CONF_CHANGE_POWER@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_5
## %bb.3:
	movl	(%rbx), %eax
	addl	%eax, %eax
	movl	%eax, (%r15)
	movq	_MT76_STATE_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_mt76x0_phy_set_txpower
LBB0_5:
	movq	_IEEE80211_CONF_CHANGE_MONITOR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_10
## %bb.6:
	movq	_IEEE80211_CONF_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MT_RX_FILTR_CFG_PROMISC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, 4(%rbx)
	je	LBB0_7
## %bb.8:
	notl	%edx
	andl	8(%r15), %edx
	jmp	LBB0_9
LBB0_7:
	orl	8(%r15), %edx
LBB0_9:
	movl	%edx, 8(%r15)
	movq	_MT_RX_FILTR_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mt76_wr
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CONF_CHANGE_CHANNEL,4,2 ## @IEEE80211_CONF_CHANGE_CHANNEL
	.comm	_IEEE80211_CONF_CHANGE_POWER,4,2 ## @IEEE80211_CONF_CHANGE_POWER
	.comm	_MT76_STATE_RUNNING,4,2         ## @MT76_STATE_RUNNING
	.comm	_IEEE80211_CONF_CHANGE_MONITOR,4,2 ## @IEEE80211_CONF_CHANGE_MONITOR
	.comm	_IEEE80211_CONF_MONITOR,4,2     ## @IEEE80211_CONF_MONITOR
	.comm	_MT_RX_FILTR_CFG_PROMISC,4,2    ## @MT_RX_FILTR_CFG_PROMISC
	.comm	_MT_RX_FILTR_CFG,4,2            ## @MT_RX_FILTR_CFG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x0_config                  ; -- Begin function mt76x0_config
	.p2align	2
_mt76x0_config:                         ; @mt76x0_config
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x22, x1
	mov	x21, x0
	ldr	x20, [x0, #16]
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _IEEE80211_CONF_CHANGE_CHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_ieee80211_stop_queues
	add	x1, x21, #8
	mov	x0, x20
	bl	_mt76x0_set_channel
	mov	x0, x21
	bl	_ieee80211_wake_queues
LBB0_2:
Lloh3:
	adrp	x8, _IEEE80211_CONF_CHANGE_POWER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_POWER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x21]
	lsl	w8, w8, #1
	mov	x1, x20
	str	w8, [x1], #12
Lloh6:
	adrp	x8, _MT76_STATE_RUNNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT76_STATE_RUNNING@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_test_bit
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_mt76x0_phy_set_txpower
LBB0_5:
Lloh9:
	adrp	x8, _IEEE80211_CONF_CHANGE_MONITOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_MONITOR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_10
; %bb.6:
Lloh12:
	adrp	x8, _IEEE80211_CONF_MONITOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IEEE80211_CONF_MONITOR@GOTPAGEOFF]
	ldr	w9, [x21, #4]
Lloh14:
	ldr	w10, [x8]
Lloh15:
	adrp	x8, _MT_RX_FILTR_CFG_PROMISC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT_RX_FILTR_CFG_PROMISC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w10, w9
	b.eq	LBB0_8
; %bb.7:
	ldr	w9, [x20, #8]
	bic	w2, w9, w8
	b	LBB0_9
LBB0_8:
	ldr	w9, [x20, #8]
	orr	w2, w9, w8
LBB0_9:
	str	w2, [x20, #8]
Lloh18:
	adrp	x8, _MT_RX_FILTR_CFG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MT_RX_FILTR_CFG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt76_wr
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CONF_CHANGE_CHANNEL,4,2 ; @IEEE80211_CONF_CHANGE_CHANNEL
	.comm	_IEEE80211_CONF_CHANGE_POWER,4,2 ; @IEEE80211_CONF_CHANGE_POWER
	.comm	_MT76_STATE_RUNNING,4,2         ; @MT76_STATE_RUNNING
	.comm	_IEEE80211_CONF_CHANGE_MONITOR,4,2 ; @IEEE80211_CONF_CHANGE_MONITOR
	.comm	_IEEE80211_CONF_MONITOR,4,2     ; @IEEE80211_CONF_MONITOR
	.comm	_MT_RX_FILTR_CFG_PROMISC,4,2    ; @MT_RX_FILTR_CFG_PROMISC
	.comm	_MT_RX_FILTR_CFG,4,2            ; @MT_RX_FILTR_CFG
.subsections_via_symbols
