	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x2u_mac_reset              ## -- Begin function mt76x2u_mac_reset
	.p2align	4, 0x90
_mt76x2u_mac_reset:                     ## @mt76x2u_mac_reset
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_MT_WPDMA_GLO_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$4, %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	$5, %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_mt76_wr
	movq	_MT_PBF_TX_MAX_PCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$-269533409, %edx               ## imm = 0xEFEF3F1F
	callq	_mt76_wr
	movq	_MT_PBF_RX_MAX_PCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$65215, %edx                    ## imm = 0xFEBF
	callq	_mt76_wr
	movq	%r15, %rdi
	callq	_mt76_write_mac_initvals
	movq	_MT_TX_LINK_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$4128, %edx                     ## imm = 0x1020
	callq	_mt76_wr
	movq	_MT_AUTO_RSP_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$19, %edx
	callq	_mt76_wr
	movq	_MT_MAX_LEN_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$12032, %edx                    ## imm = 0x2F00
	callq	_mt76_wr
	movq	_MT_WMM_AIFSN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$8819, %edx                     ## imm = 0x2273
	callq	_mt76_wr
	movq	_MT_WMM_CWMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$9028, %edx                     ## imm = 0x2344
	callq	_mt76_wr
	movq	_MT_WMM_CWMAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$13482, %edx                    ## imm = 0x34AA
	callq	_mt76_wr
	movq	_MT_MAC_SYS_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_MAC_SYS_CTRL_RESET_CSR@GOTPCREL(%rip), %rax
	movq	_MT_MAC_SYS_CTRL_RESET_BBP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_mt76_clear
	movq	%r15, %rdi
	callq	_is_mt7612
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_MT_COEXCFG0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_COEXCFG0_COEX_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_mt76_clear
LBB0_2:
	movq	_MT_EXT_CCA_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$61440, %edx                    ## imm = 0xF000
	callq	_mt76_set
	movq	_MT_TX_ALC_CFG_4@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$31, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mt76_clear
	movq	%r15, %rdi
	callq	_mt76x2u_mac_fixup_xtal
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_WPDMA_GLO_CFG,4,2           ## @MT_WPDMA_GLO_CFG
	.comm	_MT_PBF_TX_MAX_PCNT,4,2         ## @MT_PBF_TX_MAX_PCNT
	.comm	_MT_PBF_RX_MAX_PCNT,4,2         ## @MT_PBF_RX_MAX_PCNT
	.comm	_MT_TX_LINK_CFG,4,2             ## @MT_TX_LINK_CFG
	.comm	_MT_AUTO_RSP_CFG,4,2            ## @MT_AUTO_RSP_CFG
	.comm	_MT_MAX_LEN_CFG,4,2             ## @MT_MAX_LEN_CFG
	.comm	_MT_WMM_AIFSN,4,2               ## @MT_WMM_AIFSN
	.comm	_MT_WMM_CWMIN,4,2               ## @MT_WMM_CWMIN
	.comm	_MT_WMM_CWMAX,4,2               ## @MT_WMM_CWMAX
	.comm	_MT_MAC_SYS_CTRL,4,2            ## @MT_MAC_SYS_CTRL
	.comm	_MT_MAC_SYS_CTRL_RESET_CSR,4,2  ## @MT_MAC_SYS_CTRL_RESET_CSR
	.comm	_MT_MAC_SYS_CTRL_RESET_BBP,4,2  ## @MT_MAC_SYS_CTRL_RESET_BBP
	.comm	_MT_COEXCFG0,4,2                ## @MT_COEXCFG0
	.comm	_MT_COEXCFG0_COEX_EN,4,2        ## @MT_COEXCFG0_COEX_EN
	.comm	_MT_EXT_CCA_CFG,4,2             ## @MT_EXT_CCA_CFG
	.comm	_MT_TX_ALC_CFG_4,4,2            ## @MT_TX_ALC_CFG_4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x2u_mac_reset              ; -- Begin function mt76x2u_mac_reset
	.p2align	2
_mt76x2u_mac_reset:                     ; @mt76x2u_mac_reset
	.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	x19, x0
Lloh0:
	adrp	x8, _MT_WPDMA_GLO_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_WPDMA_GLO_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	w0, #4
	bl	_BIT
	mov	x21, x0
	mov	w0, #5
	bl	_BIT
	orr	w2, w0, w21
	mov	x0, x19
	mov	x1, x20
	bl	_mt76_wr
Lloh3:
	adrp	x8, _MT_PBF_TX_MAX_PCNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_PBF_TX_MAX_PCNT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #16159
	movk	w2, #61423, lsl #16
	bl	_mt76_wr
Lloh6:
	adrp	x8, _MT_PBF_RX_MAX_PCNT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT_PBF_RX_MAX_PCNT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65215
	bl	_mt76_wr
	mov	x0, x19
	bl	_mt76_write_mac_initvals
Lloh9:
	adrp	x8, _MT_TX_LINK_CFG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT_TX_LINK_CFG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #4128
	bl	_mt76_wr
Lloh12:
	adrp	x8, _MT_AUTO_RSP_CFG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MT_AUTO_RSP_CFG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #19
	bl	_mt76_wr
Lloh15:
	adrp	x8, _MT_MAX_LEN_CFG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT_MAX_LEN_CFG@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #12032
	bl	_mt76_wr
Lloh18:
	adrp	x8, _MT_WMM_AIFSN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MT_WMM_AIFSN@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #8819
	bl	_mt76_wr
Lloh21:
	adrp	x8, _MT_WMM_CWMIN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MT_WMM_CWMIN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #9028
	bl	_mt76_wr
Lloh24:
	adrp	x8, _MT_WMM_CWMAX@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MT_WMM_CWMAX@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #13482
	bl	_mt76_wr
Lloh27:
	adrp	x8, _MT_MAC_SYS_CTRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MT_MAC_SYS_CTRL@GOTPAGEOFF]
Lloh29:
	adrp	x9, _MT_MAC_SYS_CTRL_RESET_CSR@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MT_MAC_SYS_CTRL_RESET_CSR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	ldr	w8, [x9]
Lloh33:
	adrp	x9, _MT_MAC_SYS_CTRL_RESET_BBP@GOTPAGE
Lloh34:
	ldr	x9, [x9, _MT_MAC_SYS_CTRL_RESET_BBP@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_mt76_clear
	mov	x0, x19
	bl	_is_mt7612
	cbz	x0, LBB0_2
; %bb.1:
Lloh36:
	adrp	x8, _MT_COEXCFG0@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MT_COEXCFG0@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x8, _MT_COEXCFG0_COEX_EN@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MT_COEXCFG0_COEX_EN@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mt76_clear
LBB0_2:
Lloh42:
	adrp	x8, _MT_EXT_CCA_CFG@GOTPAGE
Lloh43:
	ldr	x8, [x8, _MT_EXT_CCA_CFG@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #61440
	bl	_mt76_set
Lloh45:
	adrp	x8, _MT_TX_ALC_CFG_4@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MT_TX_ALC_CFG_4@GOTPAGEOFF]
Lloh47:
	ldr	w20, [x8]
	mov	w0, #31
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mt76_clear
	mov	x0, x19
	bl	_mt76x2u_mac_fixup_xtal
	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	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_WPDMA_GLO_CFG,4,2           ; @MT_WPDMA_GLO_CFG
	.comm	_MT_PBF_TX_MAX_PCNT,4,2         ; @MT_PBF_TX_MAX_PCNT
	.comm	_MT_PBF_RX_MAX_PCNT,4,2         ; @MT_PBF_RX_MAX_PCNT
	.comm	_MT_TX_LINK_CFG,4,2             ; @MT_TX_LINK_CFG
	.comm	_MT_AUTO_RSP_CFG,4,2            ; @MT_AUTO_RSP_CFG
	.comm	_MT_MAX_LEN_CFG,4,2             ; @MT_MAX_LEN_CFG
	.comm	_MT_WMM_AIFSN,4,2               ; @MT_WMM_AIFSN
	.comm	_MT_WMM_CWMIN,4,2               ; @MT_WMM_CWMIN
	.comm	_MT_WMM_CWMAX,4,2               ; @MT_WMM_CWMAX
	.comm	_MT_MAC_SYS_CTRL,4,2            ; @MT_MAC_SYS_CTRL
	.comm	_MT_MAC_SYS_CTRL_RESET_CSR,4,2  ; @MT_MAC_SYS_CTRL_RESET_CSR
	.comm	_MT_MAC_SYS_CTRL_RESET_BBP,4,2  ; @MT_MAC_SYS_CTRL_RESET_BBP
	.comm	_MT_COEXCFG0,4,2                ; @MT_COEXCFG0
	.comm	_MT_COEXCFG0_COEX_EN,4,2        ; @MT_COEXCFG0_COEX_EN
	.comm	_MT_EXT_CCA_CFG,4,2             ; @MT_EXT_CCA_CFG
	.comm	_MT_TX_ALC_CFG_4,4,2            ; @MT_TX_ALC_CFG_4
.subsections_via_symbols
