	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x0_chip_onoff              ## -- Begin function mt76x0_chip_onoff
	.p2align	4, 0x90
_mt76x0_chip_onoff:                     ## @mt76x0_chip_onoff
	.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	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_MT_WLAN_FUN_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_mt76_rr
	movl	%eax, %ebx
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.1:
	movq	_MT_WLAN_FUN_CTRL_GPIO_OUT_EN@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	orl	(%rax), %ecx
	movq	_MT_WLAN_FUN_CTRL_FRC_WL_ANT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	%ecx, %ebx
	movq	_MT_WLAN_FUN_CTRL_WLAN_EN@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_MT_WLAN_FUN_CTRL_WLAN_RESET@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MT_WLAN_FUN_CTRL_WLAN_RESET_RF@GOTPCREL(%rip), %r12
	orl	(%r12), %ebx
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_mt76_wr
	movl	$20, %edi
	callq	_udelay
	movl	(%r12), %eax
	movq	_MT_WLAN_FUN_CTRL_WLAN_RESET@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_3:
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_mt76_wr
	movl	$20, %edi
	callq	_udelay
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt76x0_set_wlan_state          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_WLAN_FUN_CTRL,4,2           ## @MT_WLAN_FUN_CTRL
	.comm	_MT_WLAN_FUN_CTRL_GPIO_OUT_EN,4,2 ## @MT_WLAN_FUN_CTRL_GPIO_OUT_EN
	.comm	_MT_WLAN_FUN_CTRL_FRC_WL_ANT_SEL,4,2 ## @MT_WLAN_FUN_CTRL_FRC_WL_ANT_SEL
	.comm	_MT_WLAN_FUN_CTRL_WLAN_EN,4,2   ## @MT_WLAN_FUN_CTRL_WLAN_EN
	.comm	_MT_WLAN_FUN_CTRL_WLAN_RESET,4,2 ## @MT_WLAN_FUN_CTRL_WLAN_RESET
	.comm	_MT_WLAN_FUN_CTRL_WLAN_RESET_RF,4,2 ## @MT_WLAN_FUN_CTRL_WLAN_RESET_RF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x0_chip_onoff              ; -- Begin function mt76x0_chip_onoff
	.p2align	2
_mt76x0_chip_onoff:                     ; @mt76x0_chip_onoff
	.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, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _MT_WLAN_FUN_CTRL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MT_WLAN_FUN_CTRL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_mt76_rr
	mov	x21, x0
	cbz	w22, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _MT_WLAN_FUN_CTRL_GPIO_OUT_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MT_WLAN_FUN_CTRL_GPIO_OUT_EN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w8, w8, w21
Lloh5:
	adrp	x9, _MT_WLAN_FUN_CTRL_FRC_WL_ANT_SEL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MT_WLAN_FUN_CTRL_FRC_WL_ANT_SEL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	bic	w21, w8, w9
Lloh8:
	adrp	x8, _MT_WLAN_FUN_CTRL_WLAN_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MT_WLAN_FUN_CTRL_WLAN_EN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w21, w8
	b.eq	LBB0_3
; %bb.2:
Lloh11:
	adrp	x22, _MT_WLAN_FUN_CTRL_WLAN_RESET@GOTPAGE
Lloh12:
	ldr	x22, [x22, _MT_WLAN_FUN_CTRL_WLAN_RESET@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh13:
	adrp	x24, _MT_WLAN_FUN_CTRL_WLAN_RESET_RF@GOTPAGE
Lloh14:
	ldr	x24, [x24, _MT_WLAN_FUN_CTRL_WLAN_RESET_RF@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w8, w21
	orr	w21, w8, w9
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x21
	bl	_mt76_wr
	mov	w0, #20
	bl	_udelay
	ldr	w8, [x22]
	ldr	w9, [x24]
	orr	w8, w9, w8
	bic	w21, w21, w8
LBB0_3:
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x21
	bl	_mt76_wr
	mov	w0, #20
	bl	_udelay
	mov	x0, x20
	mov	x1, x21
	mov	x2, 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	_mt76x0_set_wlan_state
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_WLAN_FUN_CTRL,4,2           ; @MT_WLAN_FUN_CTRL
	.comm	_MT_WLAN_FUN_CTRL_GPIO_OUT_EN,4,2 ; @MT_WLAN_FUN_CTRL_GPIO_OUT_EN
	.comm	_MT_WLAN_FUN_CTRL_FRC_WL_ANT_SEL,4,2 ; @MT_WLAN_FUN_CTRL_FRC_WL_ANT_SEL
	.comm	_MT_WLAN_FUN_CTRL_WLAN_EN,4,2   ; @MT_WLAN_FUN_CTRL_WLAN_EN
	.comm	_MT_WLAN_FUN_CTRL_WLAN_RESET,4,2 ; @MT_WLAN_FUN_CTRL_WLAN_RESET
	.comm	_MT_WLAN_FUN_CTRL_WLAN_RESET_RF,4,2 ; @MT_WLAN_FUN_CTRL_WLAN_RESET_RF
.subsections_via_symbols
