	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x2_phy_set_channel         ## -- Begin function mt76x2_phy_set_channel
	.p2align	4, 0x90
_mt76x2_phy_set_channel:                ## @mt76x2_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rsi), %rbx
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	_MT76_SCANNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	callq	_test_bit
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movq	_MT_EXT_CCA_CFG_CCA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_EXT_CCA_CFG_CCA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%eax, %r12d
	orl	%r14d, %r12d
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r14d, %ebx
	orl	%r12d, %ebx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%edi, %edi
	callq	_BIT
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -64(%rbp)
	movq	_MT_EXT_CCA_CFG_CCA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_EXT_CCA_CFG_CCA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	movl	%eax, %r12d
	orl	%r14d, %r12d
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r14d, %ebx
	orl	%r12d, %ebx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$1, %edi
	callq	_BIT
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -60(%rbp)
	movq	_MT_EXT_CCA_CFG_CCA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_EXT_CCA_CFG_CCA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	movl	%eax, %r12d
	orl	%r14d, %r12d
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r14d, %ebx
	orl	%r12d, %ebx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$2, %edi
	callq	_BIT
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -56(%rbp)
	movq	_MT_EXT_CCA_CFG_CCA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_EXT_CCA_CFG_CCA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %r12d
	orl	%r14d, %r12d
	movq	_MT_EXT_CCA_CFG_CCA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_EXT_CCA_CFG_CCA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	orl	%r14d, %ebx
	orl	%r12d, %ebx
	movq	_MT_EXT_CCA_CFG_CCA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$3, %edi
	callq	_BIT
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -52(%rbp)
	movl	$0, 4(%r15)
	movq	8(%r13), %rax
	movl	4(%rax), %ebx
	movl	(%r13), %eax
	movl	4(%r13), %ecx
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movl	8(%rdx), %r14d
	cmpl	$128, %ecx
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	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
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leal	(%r14,%rcx,4), %r14d
	addl	$-2, %r14d
	movl	$1, %r13d
	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:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leal	(,%r12,4), %eax
	subl	%eax, %r14d
	addl	$6, %r14d
	movl	$2, %r13d
                                        ## kill: def $r12d killed $r12d killed $r12 def $r12
	jmp	LBB0_7
LBB0_2:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
LBB0_7:
	movq	%r14, %rbx
	movq	%r15, %rdi
	callq	_mt76x2_read_rx_gain
	movq	%r15, %rdi
	movl	-84(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_mt76x2_phy_set_txpower_regs
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_mt76x2_configure_tx_delay
	movq	%r15, %rdi
	callq	_mt76x2_phy_set_txpower
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	%r12d, %edx
	andl	$1, %edx
	movq	%r15, %rdi
	callq	_mt76x02_phy_set_band
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	4(%rax), %esi
	movq	%r15, %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	%r15, %rdi
	callq	_mt76_rmw
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %r8d
	callq	_mt76x2_mcu_set_channel
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.8:
	movl	12(%r15), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %ecx
	callq	_mt76x2_mcu_init_gain
	movq	%r15, %rdi
	callq	_mt76x2_phy_set_antenna
	movq	%r15, %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, %r12d
	movl	$10, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	movl	%eax, %edx
	callq	_mt76_set
LBB0_10:
	cmpl	$0, 8(%r15)
	jne	LBB0_13
## %bb.11:
	movq	_MT_EE_BT_RCAL_RESULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mt76x02_eeprom_get
	cmpl	$255, %eax
	je	LBB0_13
## %bb.12:
	movq	_MCU_CAL_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mt76x02_mcu_calibrate
LBB0_13:
	movq	_MCU_CAL_RXDCOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_mt76x02_mcu_calibrate
	cmpl	$0, 8(%r15)
	jne	LBB0_15
## %bb.14:
	movq	_MCU_CAL_RC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mt76x02_mcu_calibrate
LBB0_15:
	movl	$1, 8(%r15)
	movq	_AGC@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$61, %esi
	callq	_MT_BBP
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$-10181406, %edx                ## imm = 0xFF64A4E2
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$7, %esi
	callq	_MT_BBP
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$134746128, %edx                ## imm = 0x8081010
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$11, %esi
	callq	_MT_BBP
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$1028, %edx                     ## imm = 0x404
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$2, %esi
	callq	_MT_BBP
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$28784, %edx                    ## imm = 0x7070
	callq	_mt76_wr
	movq	_MT_TXOP_CTRL_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$68164415, %edx                 ## imm = 0x4101B3F
	callq	_mt76_wr
	testl	%r12d, %r12d
	jne	LBB0_19
## %bb.16:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_mt76x2_phy_channel_calibrate
	movq	%r15, %rdi
	callq	_mt76x02_init_agc_gain
	movq	%r15, %rdi
	callq	_mt76x2_tssi_enabled
	testq	%rax, %rax
	je	LBB0_18
## %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	%r15, %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	%r15, %rdi
	movl	$56, %ecx
	callq	_mt76_rmw_field
LBB0_18:
	movq	%r15, %rdi
	callq	_mt76_hw
	movq	_MT_CALIBRATE_INTERVAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_ieee80211_queue_delayed_work
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MT76_SCANNING,4,2              ## @MT76_SCANNING
	.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	_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	_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	_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	_mt76x2_phy_set_channel         ; -- Begin function mt76x2_phy_set_channel
	.p2align	2
_mt76x2_phy_set_channel:                ; @mt76x2_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]
	ldr	x26, [x1, #8]
Lloh3:
	adrp	x8, _MT76_SCANNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT76_SCANNING@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_bit
	ldr	w8, [x26]
	stp	w0, w8, [sp]                    ; 8-byte Folded Spill
Lloh6:
	adrp	x27, _MT_EXT_CCA_CFG_CCA0@GOTPAGE
Lloh7:
	ldr	x27, [x27, _MT_EXT_CCA_CFG_CCA0@GOTPAGEOFF]
	ldr	w0, [x27]
	mov	w1, #0
	bl	_FIELD_PREP
	mov	x23, x0
Lloh8:
	adrp	x22, _MT_EXT_CCA_CFG_CCA1@GOTPAGE
Lloh9:
	ldr	x22, [x22, _MT_EXT_CCA_CFG_CCA1@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #1
	bl	_FIELD_PREP
	orr	w20, w0, w23
Lloh10:
	adrp	x25, _MT_EXT_CCA_CFG_CCA2@GOTPAGE
Lloh11:
	ldr	x25, [x25, _MT_EXT_CCA_CFG_CCA2@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	w1, #2
	bl	_FIELD_PREP
	orr	w23, w20, w0
Lloh12:
	adrp	x20, _MT_EXT_CCA_CFG_CCA3@GOTPAGE
Lloh13:
	ldr	x20, [x20, _MT_EXT_CCA_CFG_CCA3@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #3
	bl	_FIELD_PREP
	orr	w24, w23, w0
Lloh14:
	adrp	x28, _MT_EXT_CCA_CFG_CCA_MASK@GOTPAGE
Lloh15:
	ldr	x28, [x28, _MT_EXT_CCA_CFG_CCA_MASK@GOTPAGEOFF]
	ldr	w23, [x28]
	mov	w0, #0
	bl	_BIT
	mov	x1, x0
	mov	x0, x23
	bl	_FIELD_PREP
	orr	w8, w24, w0
	str	w8, [sp, #8]
	ldr	w0, [x27]
	mov	w1, #1
	bl	_FIELD_PREP
	mov	x23, x0
	ldr	w0, [x22]
	mov	w1, #0
	bl	_FIELD_PREP
	orr	w23, w0, w23
	ldr	w0, [x25]
	mov	w1, #2
	bl	_FIELD_PREP
	orr	w23, w23, w0
	ldr	w0, [x20]
	mov	w1, #3
	bl	_FIELD_PREP
	orr	w24, w23, w0
	ldr	w23, [x28]
	mov	w0, #1
	bl	_BIT
	mov	x1, x0
	mov	x0, x23
	bl	_FIELD_PREP
	orr	w8, w24, w0
	str	w8, [sp, #12]
	ldr	w0, [x27]
	mov	w1, #2
	bl	_FIELD_PREP
	mov	x23, x0
	ldr	w0, [x22]
	mov	w1, #3
	bl	_FIELD_PREP
	orr	w23, w0, w23
	ldr	w0, [x25]
	mov	w1, #1
	bl	_FIELD_PREP
	orr	w23, w23, w0
	ldr	w0, [x20]
	mov	w1, #0
	bl	_FIELD_PREP
	orr	w24, w23, w0
	ldr	w23, [x28]
	mov	w0, #2
	bl	_BIT
	mov	x1, x0
	mov	x0, x23
	bl	_FIELD_PREP
	orr	w8, w24, w0
	str	w8, [sp, #16]
	ldr	w0, [x27]
	mov	w1, #3
	bl	_FIELD_PREP
	mov	x23, x0
	ldr	w0, [x22]
	mov	w1, #2
	bl	_FIELD_PREP
	orr	w23, w0, w23
	ldr	w0, [x25]
	mov	w1, #1
	bl	_FIELD_PREP
	orr	w23, w23, w0
	ldr	w0, [x20]
	mov	w1, #0
	bl	_FIELD_PREP
	orr	w24, w23, w0
	ldr	w23, [x28]
	mov	x28, x26
	mov	w0, #3
	bl	_BIT
	mov	x1, x0
	mov	x0, x23
	bl	_FIELD_PREP
	orr	w8, w24, w0
	str	w8, [sp, #20]
	str	wzr, [x19, #4]
	ldr	x8, [x21, #8]
	ldr	w8, [x8, #4]
	ldr	w23, [x26, #8]
	ldp	w9, w10, [x21]
	mov	x22, x27
	cmp	w10, #128
	b.eq	LBB0_3
; %bb.1:
	ldr	w20, [sp]                       ; 4-byte Folded Reload
	cmp	w10, #129
	b.ne	LBB0_4
; %bb.2:
	cmp	w8, w9
	cset	w26, ge
	mov	w8, #3
	csinc	w24, w8, wzr, ge
	mov	w8, #2
	cneg	w8, w8, ge
	add	w23, w8, w23
	mov	w25, #1
	b	LBB0_5
LBB0_3:
	ldr	w20, [sp]                       ; 4-byte Folded Reload
	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	w24, w9, w10
	sub	w8, w8, #50
	cmn	w8, #99
	cset	w0, lo
	bl	_WARN_ON
	cmp	w0, #0
	csel	w24, w24, wzr, eq
	sub	w8, w23, w24, lsl #2
	add	w23, w8, #6
	mov	w25, #2
	mov	x26, x24
	b	LBB0_5
LBB0_4:
	mov	w24, #0
	mov	w25, #0
	mov	w26, #0
LBB0_5:
	mov	x0, x19
	bl	_mt76x2_read_rx_gain
	mov	x0, x19
	ldr	w27, [sp, #4]                   ; 4-byte Folded Reload
	mov	x1, x27
	bl	_mt76x2_phy_set_txpower_regs
	mov	x0, x19
	mov	x1, x27
	mov	x2, x25
	bl	_mt76x2_configure_tx_delay
	mov	x0, x19
	bl	_mt76x2_phy_set_txpower
	ldr	w1, [x28]
	and	w2, w26, #0x1
	mov	x0, x19
	bl	_mt76x02_phy_set_band
	ldr	w1, [x21, #4]
	mov	x0, x19
	mov	x2, x26
	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, [x22]
Lloh19:
	adrp	x9, _MT_EXT_CCA_CFG_CCA1@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MT_EXT_CCA_CFG_CCA1@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _MT_EXT_CCA_CFG_CCA2@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MT_EXT_CCA_CFG_CCA2@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh25:
	adrp	x9, _MT_EXT_CCA_CFG_CCA3@GOTPAGE
Lloh26:
	ldr	x9, [x9, _MT_EXT_CCA_CFG_CCA3@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh28:
	adrp	x9, _MT_EXT_CCA_CFG_CCA_MASK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MT_EXT_CCA_CFG_CCA_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w2, w8, w9
	add	x8, sp, #8
	ldr	w3, [x8, w26, sxtw #2]
	mov	x0, x19
	bl	_mt76_rmw
	mov	x0, x19
	mov	x1, x23
	mov	x2, x25
	mov	x3, x24
	mov	x24, x20
	mov	x4, x20
	bl	_mt76x2_mcu_set_channel
	mov	x21, x0
	cbnz	w0, LBB0_17
; %bb.6:
	ldr	w2, [x19, #12]
	mov	x0, x19
	mov	x1, x23
	mov	w3, #1
	bl	_mt76x2_mcu_init_gain
	mov	x0, x19
	bl	_mt76x2_phy_set_antenna
	mov	x0, x19
	bl	_mt76xx_rev
Lloh31:
	adrp	x8, _MT76XX_REV_E3@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MT76XX_REV_E3@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lt	LBB0_8
; %bb.7:
Lloh34:
	adrp	x8, _RXO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _RXO@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	mov	w1, #13
	bl	_MT_BBP
	mov	x22, x0
	mov	w0, #10
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_mt76_set
LBB0_8:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_11
; %bb.9:
Lloh37:
	adrp	x8, _MT_EE_BT_RCAL_RESULT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MT_EE_BT_RCAL_RESULT@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76x02_eeprom_get
	cmp	w0, #255
	b.eq	LBB0_11
; %bb.10:
Lloh40:
	adrp	x8, _MCU_CAL_R@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MCU_CAL_R@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt76x02_mcu_calibrate
LBB0_11:
Lloh43:
	adrp	x8, _MCU_CAL_RXDCOC@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MCU_CAL_RXDCOC@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_mt76x02_mcu_calibrate
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_13
; %bb.12:
Lloh46:
	adrp	x8, _MCU_CAL_RC@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MCU_CAL_RC@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt76x02_mcu_calibrate
LBB0_13:
	mov	w8, #1
	str	w8, [x19, #8]
Lloh49:
	adrp	x20, _AGC@GOTPAGE
Lloh50:
	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
Lloh51:
	adrp	x8, _MT_TXOP_CTRL_CFG@GOTPAGE
Lloh52:
	ldr	x8, [x8, _MT_TXOP_CTRL_CFG@GOTPAGEOFF]
Lloh53:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #6975
	movk	w2, #1040, lsl #16
	bl	_mt76_wr
	cbnz	w24, LBB0_17
; %bb.14:
	mov	x0, x19
	mov	w1, #1
	bl	_mt76x2_phy_channel_calibrate
	mov	x0, x19
	bl	_mt76x02_init_agc_gain
	mov	x0, x19
	bl	_mt76x2_tssi_enabled
	cbz	x0, LBB0_16
; %bb.15:
Lloh54:
	adrp	x8, _MT_TX_ALC_CFG_1@GOTPAGE
Lloh55:
	ldr	x8, [x8, _MT_TX_ALC_CFG_1@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
Lloh57:
	adrp	x8, _MT_TX_ALC_CFG_1_TEMP_COMP@GOTPAGE
Lloh58:
	ldr	x8, [x8, _MT_TX_ALC_CFG_1_TEMP_COMP@GOTPAGEOFF]
Lloh59:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #56
	bl	_mt76_rmw_field
Lloh60:
	adrp	x8, _MT_TX_ALC_CFG_2@GOTPAGE
Lloh61:
	ldr	x8, [x8, _MT_TX_ALC_CFG_2@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
Lloh63:
	adrp	x8, _MT_TX_ALC_CFG_2_TEMP_COMP@GOTPAGE
Lloh64:
	ldr	x8, [x8, _MT_TX_ALC_CFG_2_TEMP_COMP@GOTPAGEOFF]
Lloh65:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #56
	bl	_mt76_rmw_field
LBB0_16:
	mov	x0, x19
	bl	_mt76_hw
Lloh66:
	adrp	x8, _MT_CALIBRATE_INTERVAL@GOTPAGE
Lloh67:
	ldr	x8, [x8, _MT_CALIBRATE_INTERVAL@GOTPAGEOFF]
Lloh68:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_ieee80211_queue_delayed_work
LBB0_17:
	ldr	x8, [sp, #24]
Lloh69:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh70:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh71:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	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_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.cfi_endproc
                                        ; -- End function
	.comm	_MT76_SCANNING,4,2              ; @MT76_SCANNING
	.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	_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	_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	_MT_CALIBRATE_INTERVAL,4,2      ; @MT_CALIBRATE_INTERVAL
.subsections_via_symbols
