	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x2u_phy_set_channel        ## -- Begin function mt76x2u_phy_set_channel
	.p2align	4, 0x90
_mt76x2u_phy_set_channel:               ## @mt76x2u_phy_set_channel
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MT_EXT_CCA_CFG_CCA0@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movq	_MT_EXT_CCA_CFG_CCA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%eax, %r13d
	orl	%r15d, %r13d
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r15d, %ebx
	orl	%r13d, %ebx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edi, %edi
	callq	_BIT
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -64(%rbp)
	movl	(%r12), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movq	_MT_EXT_CCA_CFG_CCA1@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	movl	%eax, %r13d
	orl	%r15d, %r13d
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r15d, %ebx
	orl	%r13d, %ebx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$1, %edi
	callq	_BIT
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -60(%rbp)
	movl	(%r12), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movl	(%r14), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	movl	%eax, %r13d
	orl	%r15d, %r13d
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r15d, %ebx
	orl	%r13d, %ebx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$2, %edi
	callq	_BIT
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -56(%rbp)
	movl	(%r12), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movl	(%r14), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %r13d
	orl	%r15d, %r13d
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r15d, %ebx
	orl	%r13d, %ebx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$3, %edi
	callq	_BIT
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -52(%rbp)
	movq	_MT76_SCANNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	leaq	32(%rbx), %rsi
	callq	_test_bit
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %r13
	movl	(%r13), %r14d
	movl	$0, 4(%rbx)
	movl	4(%r13), %ebx
	movl	(%rcx), %eax
	movl	4(%rcx), %ecx
	cmpl	$128, %ecx
	je	LBB0_4
## %bb.1:
	cmpl	$129, %ecx
	jne	LBB0_2
## %bb.3:
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
	cmpl	%eax, %ebx
	setl	%cl
	setge	%r12b
	leal	(%r12,%r12), %eax
	incl	%eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	leal	(%r14,%rcx,4), %r14d
	addl	$-2, %r14d
	movl	$1, %r15d
	jmp	LBB0_7
LBB0_4:
	subl	%eax, %ebx
	leal	-50(%rbx), %eax
	xorl	%edi, %edi
	cmpl	$-99, %eax
	setb	%dil
	callq	_WARN_ON
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	addl	$30, %ebx
	movslq	%ebx, %rax
	imulq	$1717986919, %rax, %r12         ## imm = 0x66666667
	movq	%r12, %rax
	shrq	$63, %rax
	sarq	$35, %r12
	addl	%eax, %r12d
LBB0_6:
	leal	(,%r12,4), %eax
	subl	%eax, %r14d
	addl	$6, %r14d
	movl	$2, %r15d
	movl	%r12d, %eax
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	jmp	LBB0_7
LBB0_2:
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
LBB0_7:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mt76x2_read_rx_gain
	movq	8(%r13), %rsi
	movq	%rbx, %rdi
	callq	_mt76x2_phy_set_txpower_regs
	movq	8(%r13), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_mt76x2_configure_tx_delay
	movq	%rbx, %rdi
	callq	_mt76x2_phy_set_txpower
	movq	8(%r13), %rsi
	movl	%r12d, %edx
	andl	$1, %edx
	movq	%rbx, %rdi
	callq	_mt76x02_phy_set_band
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_mt76x02_phy_set_bw
	movq	_MT_EXT_CCA_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_EXT_CCA_CFG_CCA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MT_EXT_CCA_CFG_CCA0@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movslq	%r12d, %rax
	movl	-64(%rbp,%rax,4), %ecx
	movq	%rbx, %rdi
	callq	_mt76_rmw
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %r8d
	callq	_mt76x2_mcu_set_channel
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_24
## %bb.8:
	movl	16(%rbx), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_mt76x2_mcu_init_gain
	movq	%rbx, %rdi
	callq	_mt76xx_rev
	movq	_MT76XX_REV_E3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_10
## %bb.9:
	movq	_RXO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$13, %esi
	callq	_MT_BBP
	movl	%eax, %r13d
	movl	$10, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_mt76_set
LBB0_10:
	cmpl	$0, 8(%rbx)
	jne	LBB0_13
## %bb.11:
	movq	_MT_EE_BT_RCAL_RESULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mt76x02_eeprom_get
	cmpl	$255, %eax
	je	LBB0_13
## %bb.12:
	movq	_MCU_CAL_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt76x02_mcu_calibrate
LBB0_13:
	movq	_MCU_CAL_RXDCOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_mt76x02_mcu_calibrate
	cmpl	$0, 8(%rbx)
	jne	LBB0_15
## %bb.14:
	movq	_MCU_CAL_RC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt76x02_mcu_calibrate
LBB0_15:
	movl	$1, 8(%rbx)
	movq	_AGC@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$61, %esi
	callq	_MT_BBP
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$-10181406, %edx                ## imm = 0xFF64A4E2
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$7, %esi
	callq	_MT_BBP
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$134746128, %edx                ## imm = 0x8081010
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$11, %esi
	callq	_MT_BBP
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$1028, %edx                     ## imm = 0x404
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$2, %esi
	callq	_MT_BBP
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$28784, %edx                    ## imm = 0x7070
	callq	_mt76_wr
	movq	_MT_TXOP_CTRL_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$68164415, %edx                 ## imm = 0x4101B3F
	callq	_mt76_wr
	movq	_TXO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_MT_BBP
	movl	%eax, %r14d
	movl	$25, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_mt76_set
	movq	_RXO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$13, %esi
	callq	_MT_BBP
	movl	%eax, %r14d
	movl	$8, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_mt76_set
	testl	%r12d, %r12d
	jne	LBB0_24
## %bb.16:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mt76x2u_phy_channel_calibrate
	movq	%rbx, %rdi
	callq	_mt76x02_init_agc_gain
	movq	%rbx, %rdi
	callq	_mt76x2_tssi_enabled
	testq	%rax, %rax
	je	LBB0_23
## %bb.17:
	movq	_MT_TX_ALC_CFG_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_TX_ALC_CFG_1_TEMP_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$56, %ecx
	callq	_mt76_rmw_field
	movq	_MT_TX_ALC_CFG_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_TX_ALC_CFG_2_TEMP_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$56, %ecx
	callq	_mt76_rmw_field
	movq	%rbx, %rdi
	callq	_mt76x2_channel_silent
	testl	%eax, %eax
	jne	LBB0_23
## %bb.18:
	movq	24(%rbx), %r14
	movq	8(%r14), %rsi
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpq	(%rax), %rsi
	jne	LBB0_20
## %bb.19:
	xorl	%edi, %edi
	callq	_BIT
	movl	%eax, %r12d
	movq	8(%r14), %rsi
LBB0_20:
	movq	%rbx, %rdi
	callq	_mt76x02_ext_pa_enabled
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movl	$8, %edi
	callq	_BIT
	orl	%eax, %r12d
LBB0_22:
	movq	_MCU_CAL_TSSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_mt76x02_mcu_calibrate
	movl	$1, 12(%rbx)
LBB0_23:
	movq	%rbx, %rdi
	callq	_mt76_hw
	movq	_MT_CALIBRATE_INTERVAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_ieee80211_queue_delayed_work
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_EXT_CCA_CFG_CCA0,4,2        ## @MT_EXT_CCA_CFG_CCA0
	.comm	_MT_EXT_CCA_CFG_CCA1,4,2        ## @MT_EXT_CCA_CFG_CCA1
	.comm	_MT_EXT_CCA_CFG_CCA2,4,2        ## @MT_EXT_CCA_CFG_CCA2
	.comm	_MT_EXT_CCA_CFG_CCA3,4,2        ## @MT_EXT_CCA_CFG_CCA3
	.comm	_MT_EXT_CCA_CFG_CCA_MASK,4,2    ## @MT_EXT_CCA_CFG_CCA_MASK
	.comm	_MT76_SCANNING,4,2              ## @MT76_SCANNING
	.comm	_MT_EXT_CCA_CFG,4,2             ## @MT_EXT_CCA_CFG
	.comm	_MT76XX_REV_E3,8,3              ## @MT76XX_REV_E3
	.comm	_RXO,4,2                        ## @RXO
	.comm	_MT_EE_BT_RCAL_RESULT,4,2       ## @MT_EE_BT_RCAL_RESULT
	.comm	_MCU_CAL_R,4,2                  ## @MCU_CAL_R
	.comm	_MCU_CAL_RXDCOC,4,2             ## @MCU_CAL_RXDCOC
	.comm	_MCU_CAL_RC,4,2                 ## @MCU_CAL_RC
	.comm	_AGC,4,2                        ## @AGC
	.comm	_MT_TXOP_CTRL_CFG,4,2           ## @MT_TXOP_CTRL_CFG
	.comm	_TXO,4,2                        ## @TXO
	.comm	_MT_TX_ALC_CFG_1,4,2            ## @MT_TX_ALC_CFG_1
	.comm	_MT_TX_ALC_CFG_1_TEMP_COMP,4,2  ## @MT_TX_ALC_CFG_1_TEMP_COMP
	.comm	_MT_TX_ALC_CFG_2,4,2            ## @MT_TX_ALC_CFG_2
	.comm	_MT_TX_ALC_CFG_2_TEMP_COMP,4,2  ## @MT_TX_ALC_CFG_2_TEMP_COMP
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_MCU_CAL_TSSI,4,2               ## @MCU_CAL_TSSI
	.comm	_MT_CALIBRATE_INTERVAL,4,2      ## @MT_CALIBRATE_INTERVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x2u_phy_set_channel        ; -- Begin function mt76x2u_phy_set_channel
	.p2align	2
_mt76x2u_phy_set_channel:               ; @mt76x2u_phy_set_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x23, _MT_EXT_CCA_CFG_CCA0@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MT_EXT_CCA_CFG_CCA0@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #0
	bl	_FIELD_PREP
	mov	x20, x0
Lloh5:
	adrp	x24, _MT_EXT_CCA_CFG_CCA1@GOTPAGE
Lloh6:
	ldr	x24, [x24, _MT_EXT_CCA_CFG_CCA1@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	w1, #1
	bl	_FIELD_PREP
	orr	w20, w0, w20
Lloh7:
	adrp	x28, _MT_EXT_CCA_CFG_CCA2@GOTPAGE
Lloh8:
	ldr	x28, [x28, _MT_EXT_CCA_CFG_CCA2@GOTPAGEOFF]
	ldr	w0, [x28]
	mov	w1, #2
	bl	_FIELD_PREP
	orr	w20, w20, w0
Lloh9:
	adrp	x26, _MT_EXT_CCA_CFG_CCA3@GOTPAGE
Lloh10:
	ldr	x26, [x26, _MT_EXT_CCA_CFG_CCA3@GOTPAGEOFF]
	ldr	w0, [x26]
	mov	w1, #3
	bl	_FIELD_PREP
	orr	w22, w20, w0
Lloh11:
	adrp	x27, _MT_EXT_CCA_CFG_CCA_MASK@GOTPAGE
Lloh12:
	ldr	x27, [x27, _MT_EXT_CCA_CFG_CCA_MASK@GOTPAGEOFF]
	ldr	w20, [x27]
	mov	w0, #0
	bl	_BIT
	mov	x1, x0
	mov	x0, x20
	bl	_FIELD_PREP
	orr	w8, w22, w0
	str	w8, [sp, #8]
	ldr	w0, [x23]
	mov	w1, #1
	bl	_FIELD_PREP
	mov	x20, x0
	ldr	w0, [x24]
	mov	w1, #0
	bl	_FIELD_PREP
	orr	w20, w0, w20
	ldr	w0, [x28]
	mov	w1, #2
	bl	_FIELD_PREP
	orr	w20, w20, w0
	ldr	w0, [x26]
	mov	w1, #3
	bl	_FIELD_PREP
	orr	w22, w20, w0
	ldr	w20, [x27]
	mov	w0, #1
	bl	_BIT
	mov	x1, x0
	mov	x0, x20
	bl	_FIELD_PREP
	orr	w8, w22, w0
	str	w8, [sp, #12]
	ldr	w0, [x23]
	mov	w1, #2
	bl	_FIELD_PREP
	mov	x20, x0
	ldr	w0, [x24]
	mov	w1, #3
	bl	_FIELD_PREP
	orr	w20, w0, w20
	ldr	w0, [x28]
	mov	w1, #1
	bl	_FIELD_PREP
	orr	w20, w20, w0
	ldr	w0, [x26]
	mov	w1, #0
	bl	_FIELD_PREP
	orr	w22, w20, w0
	ldr	w20, [x27]
	mov	w0, #2
	bl	_BIT
	mov	x1, x0
	mov	x0, x20
	bl	_FIELD_PREP
	orr	w8, w22, w0
	str	w8, [sp, #16]
	ldr	w0, [x23]
	mov	w1, #3
	bl	_FIELD_PREP
	mov	x20, x0
	ldr	w0, [x24]
	mov	w1, #2
	bl	_FIELD_PREP
	orr	w20, w0, w20
	ldr	w0, [x28]
	mov	w1, #1
	bl	_FIELD_PREP
	orr	w20, w20, w0
	ldr	w0, [x26]
	mov	w1, #0
	bl	_FIELD_PREP
	orr	w22, w20, w0
	ldr	w20, [x27]
	mov	w0, #3
	bl	_BIT
	mov	x1, x0
	mov	x0, x20
	bl	_FIELD_PREP
	orr	w8, w22, w0
	str	w8, [sp, #20]
Lloh13:
	adrp	x8, _MT76_SCANNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MT76_SCANNING@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_test_bit
	ldr	x20, [x21, #8]
	ldr	w22, [x20]
	str	wzr, [x19, #4]
	ldr	w8, [x20, #4]
	ldp	w9, w10, [x21]
	cmp	w10, #128
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
	mov	x27, x24
	mov	x26, x23
	b.eq	LBB0_3
; %bb.1:
	cmp	w10, #129
	b.ne	LBB0_4
; %bb.2:
	cmp	w8, w9
	cset	w23, ge
	mov	w8, #3
	csinc	w24, w8, wzr, ge
	mov	w8, #2
	cneg	w8, w8, ge
	add	w22, w8, w22
	mov	w25, #1
	b	LBB0_5
LBB0_3:
	sub	w8, w8, w9
	add	w9, w8, #30
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #35
	add	w23, w9, w10
	sub	w8, w8, #50
	cmn	w8, #99
	cset	w0, lo
	bl	_WARN_ON
	cmp	w0, #0
	csel	w23, w23, wzr, eq
	sub	w8, w22, w23, lsl #2
	add	w22, w8, #6
	mov	w25, #2
	mov	x24, x23
	b	LBB0_5
LBB0_4:
	mov	w23, #0
	mov	w24, #0
	mov	w25, #0
LBB0_5:
	mov	x0, x19
	bl	_mt76x2_read_rx_gain
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_mt76x2_phy_set_txpower_regs
	ldr	x1, [x20, #8]
	mov	x0, x19
	mov	x2, x25
	bl	_mt76x2_configure_tx_delay
	mov	x0, x19
	bl	_mt76x2_phy_set_txpower
	ldr	x1, [x20, #8]
	and	w2, w23, #0x1
	mov	x0, x19
	bl	_mt76x02_phy_set_band
	ldr	w1, [x21, #4]
	mov	x0, x19
	mov	x2, x23
	bl	_mt76x02_phy_set_bw
Lloh16:
	adrp	x8, _MT_EXT_CCA_CFG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MT_EXT_CCA_CFG@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w8, w9, w8
	ldr	w9, [x28]
	orr	w8, w8, w9
Lloh19:
	adrp	x9, _MT_EXT_CCA_CFG_CCA3@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MT_EXT_CCA_CFG_CCA3@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _MT_EXT_CCA_CFG_CCA_MASK@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MT_EXT_CCA_CFG_CCA_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w8, w9
	add	x8, sp, #8
	ldr	w3, [x8, w23, sxtw #2]
	mov	x0, x19
	bl	_mt76_rmw
	mov	x0, x19
	mov	x1, x22
	mov	x2, x25
	mov	x3, x24
	ldr	w25, [sp, #4]                   ; 4-byte Folded Reload
	mov	x4, x25
	bl	_mt76x2_mcu_set_channel
	mov	x21, x0
	cbnz	w0, LBB0_23
; %bb.6:
	ldr	w2, [x19, #16]
	mov	x0, x19
	mov	x1, x22
	mov	w3, #1
	bl	_mt76x2_mcu_init_gain
	mov	x0, x19
	bl	_mt76xx_rev
Lloh25:
	adrp	x8, _MT76XX_REV_E3@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MT76XX_REV_E3@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x24, _RXO@GOTPAGE
Lloh29:
	ldr	x24, [x24, _RXO@GOTPAGEOFF]
	cmp	x0, x8
	b.lt	LBB0_8
; %bb.7:
	ldr	w0, [x24]
	mov	w1, #13
	bl	_MT_BBP
	mov	x23, x0
	mov	w0, #10
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_mt76_set
LBB0_8:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_11
; %bb.9:
Lloh30:
	adrp	x8, _MT_EE_BT_RCAL_RESULT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MT_EE_BT_RCAL_RESULT@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76x02_eeprom_get
	cmp	w0, #255
	b.eq	LBB0_11
; %bb.10:
Lloh33:
	adrp	x8, _MCU_CAL_R@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MCU_CAL_R@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt76x02_mcu_calibrate
LBB0_11:
Lloh36:
	adrp	x8, _MCU_CAL_RXDCOC@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MCU_CAL_RXDCOC@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_mt76x02_mcu_calibrate
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_13
; %bb.12:
Lloh39:
	adrp	x8, _MCU_CAL_RC@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MCU_CAL_RC@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt76x02_mcu_calibrate
LBB0_13:
	mov	w8, #1
	str	w8, [x19, #8]
Lloh42:
	adrp	x20, _AGC@GOTPAGE
Lloh43:
	ldr	x20, [x20, _AGC@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #61
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	mov	w2, #42210
	movk	w2, #65380, lsl #16
	bl	_mt76_wr
	ldr	w0, [x20]
	mov	w1, #7
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	mov	w2, #4112
	movk	w2, #2056, lsl #16
	bl	_mt76_wr
	ldr	w0, [x20]
	mov	w1, #11
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	mov	w2, #1028
	bl	_mt76_wr
	ldr	w0, [x20]
	mov	w1, #2
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	mov	w2, #28784
	bl	_mt76_wr
Lloh44:
	adrp	x8, _MT_TXOP_CTRL_CFG@GOTPAGE
Lloh45:
	ldr	x8, [x8, _MT_TXOP_CTRL_CFG@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #6975
	movk	w2, #1040, lsl #16
	bl	_mt76_wr
Lloh47:
	adrp	x8, _TXO@GOTPAGE
Lloh48:
	ldr	x8, [x8, _TXO@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
	mov	w1, #4
	bl	_MT_BBP
	mov	x22, x0
	mov	w0, #25
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_mt76_set
	ldr	w0, [x24]
	mov	w1, #13
	bl	_MT_BBP
	mov	x22, x0
	mov	w0, #8
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_mt76_set
	cbnz	w25, LBB0_23
; %bb.14:
	mov	x0, x19
	mov	w1, #1
	bl	_mt76x2u_phy_channel_calibrate
	mov	x0, x19
	bl	_mt76x02_init_agc_gain
	mov	x0, x19
	bl	_mt76x2_tssi_enabled
	cbz	x0, LBB0_22
; %bb.15:
Lloh50:
	adrp	x8, _MT_TX_ALC_CFG_1@GOTPAGE
Lloh51:
	ldr	x8, [x8, _MT_TX_ALC_CFG_1@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
Lloh53:
	adrp	x8, _MT_TX_ALC_CFG_1_TEMP_COMP@GOTPAGE
Lloh54:
	ldr	x8, [x8, _MT_TX_ALC_CFG_1_TEMP_COMP@GOTPAGEOFF]
Lloh55:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #56
	bl	_mt76_rmw_field
Lloh56:
	adrp	x8, _MT_TX_ALC_CFG_2@GOTPAGE
Lloh57:
	ldr	x8, [x8, _MT_TX_ALC_CFG_2@GOTPAGEOFF]
Lloh58:
	ldr	w1, [x8]
Lloh59:
	adrp	x8, _MT_TX_ALC_CFG_2_TEMP_COMP@GOTPAGE
Lloh60:
	ldr	x8, [x8, _MT_TX_ALC_CFG_2_TEMP_COMP@GOTPAGEOFF]
Lloh61:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #56
	bl	_mt76_rmw_field
	mov	x0, x19
	bl	_mt76x2_channel_silent
	cbnz	w0, LBB0_22
; %bb.16:
	ldr	x22, [x19, #24]
	ldr	x1, [x22, #8]
Lloh62:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh63:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh64:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_18
; %bb.17:
	mov	w0, #0
	bl	_BIT
	mov	x20, x0
	ldr	x1, [x22, #8]
	b	LBB0_19
LBB0_18:
	mov	w20, #0
LBB0_19:
	mov	x0, x19
	bl	_mt76x02_ext_pa_enabled
	cbz	x0, LBB0_21
; %bb.20:
	mov	w0, #8
	bl	_BIT
	orr	w20, w0, w20
LBB0_21:
Lloh65:
	adrp	x8, _MCU_CAL_TSSI@GOTPAGE
Lloh66:
	ldr	x8, [x8, _MCU_CAL_TSSI@GOTPAGEOFF]
Lloh67:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_mt76x02_mcu_calibrate
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_22:
	mov	x0, x19
	bl	_mt76_hw
Lloh68:
	adrp	x8, _MT_CALIBRATE_INTERVAL@GOTPAGE
Lloh69:
	ldr	x8, [x8, _MT_CALIBRATE_INTERVAL@GOTPAGEOFF]
Lloh70:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_ieee80211_queue_delayed_work
LBB0_23:
	ldr	x8, [sp, #24]
Lloh71:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh72:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh73:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_EXT_CCA_CFG_CCA0,4,2        ; @MT_EXT_CCA_CFG_CCA0
	.comm	_MT_EXT_CCA_CFG_CCA1,4,2        ; @MT_EXT_CCA_CFG_CCA1
	.comm	_MT_EXT_CCA_CFG_CCA2,4,2        ; @MT_EXT_CCA_CFG_CCA2
	.comm	_MT_EXT_CCA_CFG_CCA3,4,2        ; @MT_EXT_CCA_CFG_CCA3
	.comm	_MT_EXT_CCA_CFG_CCA_MASK,4,2    ; @MT_EXT_CCA_CFG_CCA_MASK
	.comm	_MT76_SCANNING,4,2              ; @MT76_SCANNING
	.comm	_MT_EXT_CCA_CFG,4,2             ; @MT_EXT_CCA_CFG
	.comm	_MT76XX_REV_E3,8,3              ; @MT76XX_REV_E3
	.comm	_RXO,4,2                        ; @RXO
	.comm	_MT_EE_BT_RCAL_RESULT,4,2       ; @MT_EE_BT_RCAL_RESULT
	.comm	_MCU_CAL_R,4,2                  ; @MCU_CAL_R
	.comm	_MCU_CAL_RXDCOC,4,2             ; @MCU_CAL_RXDCOC
	.comm	_MCU_CAL_RC,4,2                 ; @MCU_CAL_RC
	.comm	_AGC,4,2                        ; @AGC
	.comm	_MT_TXOP_CTRL_CFG,4,2           ; @MT_TXOP_CTRL_CFG
	.comm	_TXO,4,2                        ; @TXO
	.comm	_MT_TX_ALC_CFG_1,4,2            ; @MT_TX_ALC_CFG_1
	.comm	_MT_TX_ALC_CFG_1_TEMP_COMP,4,2  ; @MT_TX_ALC_CFG_1_TEMP_COMP
	.comm	_MT_TX_ALC_CFG_2,4,2            ; @MT_TX_ALC_CFG_2
	.comm	_MT_TX_ALC_CFG_2_TEMP_COMP,4,2  ; @MT_TX_ALC_CFG_2_TEMP_COMP
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_MCU_CAL_TSSI,4,2               ; @MCU_CAL_TSSI
	.comm	_MT_CALIBRATE_INTERVAL,4,2      ; @MT_CALIBRATE_INTERVAL
.subsections_via_symbols
