	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x02_bss_info_changed       ## -- Begin function mt76x02_bss_info_changed
	.p2align	4, 0x90
_mt76x02_bss_info_changed:              ## @mt76x02_bss_info_changed
	.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	%ecx, %ebx
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	(%rsi), %r14
	movq	(%rdi), %r12
	leaq	8(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_BSS_CHANGED_BSSID@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movl	(%r14), %esi
	movl	32(%r15), %edx
	movq	%r12, %rdi
	callq	_mt76x02_mac_set_bssid
LBB0_2:
	movq	_BSS_CHANGED_HT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_BSS_CHANGED_ERP_CTS_PROT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
LBB0_4:
	movl	24(%r15), %edx
	movl	28(%r15), %esi
	movq	%r12, %rdi
	callq	_mt76x02_mac_set_tx_protection
LBB0_5:
	movq	_BSS_CHANGED_BEACON_INT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.6:
	movq	_MT_BEACON_TIME_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_BEACON_TIME_CFG_INTVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	shll	$4, %ecx
	movq	%r12, %rdi
	callq	_mt76_rmw_field
	movl	(%r15), %eax
	movl	%eax, 4(%r12)
LBB0_7:
	movq	_BSS_CHANGED_BEACON_ENABLED@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_9
## %bb.8:
	movl	20(%r15), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_mt76x02_mac_set_beacon_enable
LBB0_9:
	movq	_BSS_CHANGED_ERP_PREAMBLE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	movl	16(%r15), %esi
	movq	%r12, %rdi
	callq	_mt76x02_mac_set_short_preamble
LBB0_11:
	movq	_BSS_CHANGED_ERP_SLOT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_13
## %bb.12:
	cmpq	$0, 8(%r15)
	movl	$20, %eax
	movl	$9, %ecx
	cmovel	%eax, %ecx
	movl	%ecx, (%r12)
	movq	%r12, %rdi
	callq	_mt76x02_set_tx_ackto
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BSS_CHANGED_BSSID,4,2          ## @BSS_CHANGED_BSSID
	.comm	_BSS_CHANGED_HT,4,2             ## @BSS_CHANGED_HT
	.comm	_BSS_CHANGED_ERP_CTS_PROT,4,2   ## @BSS_CHANGED_ERP_CTS_PROT
	.comm	_BSS_CHANGED_BEACON_INT,4,2     ## @BSS_CHANGED_BEACON_INT
	.comm	_MT_BEACON_TIME_CFG,4,2         ## @MT_BEACON_TIME_CFG
	.comm	_MT_BEACON_TIME_CFG_INTVAL,4,2  ## @MT_BEACON_TIME_CFG_INTVAL
	.comm	_BSS_CHANGED_BEACON_ENABLED,4,2 ## @BSS_CHANGED_BEACON_ENABLED
	.comm	_BSS_CHANGED_ERP_PREAMBLE,4,2   ## @BSS_CHANGED_ERP_PREAMBLE
	.comm	_BSS_CHANGED_ERP_SLOT,4,2       ## @BSS_CHANGED_ERP_SLOT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x02_bss_info_changed       ; -- Begin function mt76x02_bss_info_changed
	.p2align	2
_mt76x02_bss_info_changed:              ; @mt76x02_bss_info_changed
	.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, x3
	mov	x21, x2
	mov	x23, x1
	ldr	x24, [x1]
	ldr	x20, [x0]
	add	x19, x20, #8
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _BSS_CHANGED_BSSID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BSS_CHANGED_BSSID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x24]
	ldr	w2, [x21, #32]
	mov	x0, x20
	bl	_mt76x02_mac_set_bssid
LBB0_2:
Lloh3:
	adrp	x8, _BSS_CHANGED_HT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BSS_CHANGED_HT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _BSS_CHANGED_ERP_CTS_PROT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BSS_CHANGED_ERP_CTS_PROT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_5
LBB0_4:
	ldp	w2, w1, [x21, #24]
	mov	x0, x20
	bl	_mt76x02_mac_set_tx_protection
LBB0_5:
Lloh9:
	adrp	x8, _BSS_CHANGED_BEACON_INT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BSS_CHANGED_BEACON_INT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _MT_BEACON_TIME_CFG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MT_BEACON_TIME_CFG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _MT_BEACON_TIME_CFG_INTVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT_BEACON_TIME_CFG_INTVAL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	ldr	w8, [x21]
	lsl	w3, w8, #4
	mov	x0, x20
	bl	_mt76_rmw_field
	ldr	w8, [x21]
	str	w8, [x20, #4]
LBB0_7:
Lloh18:
	adrp	x8, _BSS_CHANGED_BEACON_ENABLED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BSS_CHANGED_BEACON_ENABLED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.8:
	ldr	w2, [x21, #20]
	mov	x0, x20
	mov	x1, x23
	bl	_mt76x02_mac_set_beacon_enable
LBB0_9:
Lloh21:
	adrp	x8, _BSS_CHANGED_ERP_PREAMBLE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BSS_CHANGED_ERP_PREAMBLE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_11
; %bb.10:
	ldr	w1, [x21, #16]
	mov	x0, x20
	bl	_mt76x02_mac_set_short_preamble
LBB0_11:
Lloh24:
	adrp	x8, _BSS_CHANGED_ERP_SLOT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BSS_CHANGED_ERP_SLOT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_13
; %bb.12:
	ldr	x8, [x21, #8]
	cmp	x8, #0
	mov	w8, #9
	mov	w9, #20
	csel	w8, w9, w8, eq
	str	w8, [x20]
	mov	x0, x20
	bl	_mt76x02_set_tx_ackto
LBB0_13:
	mov	x0, x19
	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	_mutex_unlock
	.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
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_BSS_CHANGED_BSSID,4,2          ; @BSS_CHANGED_BSSID
	.comm	_BSS_CHANGED_HT,4,2             ; @BSS_CHANGED_HT
	.comm	_BSS_CHANGED_ERP_CTS_PROT,4,2   ; @BSS_CHANGED_ERP_CTS_PROT
	.comm	_BSS_CHANGED_BEACON_INT,4,2     ; @BSS_CHANGED_BEACON_INT
	.comm	_MT_BEACON_TIME_CFG,4,2         ; @MT_BEACON_TIME_CFG
	.comm	_MT_BEACON_TIME_CFG_INTVAL,4,2  ; @MT_BEACON_TIME_CFG_INTVAL
	.comm	_BSS_CHANGED_BEACON_ENABLED,4,2 ; @BSS_CHANGED_BEACON_ENABLED
	.comm	_BSS_CHANGED_ERP_PREAMBLE,4,2   ; @BSS_CHANGED_ERP_PREAMBLE
	.comm	_BSS_CHANGED_ERP_SLOT,4,2       ; @BSS_CHANGED_ERP_SLOT
.subsections_via_symbols
