	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x0_set_wlan_state
_mt76x0_set_wlan_state:                 ## @mt76x0_set_wlan_state
	.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
	movl	%edx, %r15d
	movq	%rdi, %r14
	movq	_MT_CMB_CTRL_XTAL_RDY@GOTPCREL(%rip), %rax
	movq	_MT_CMB_CTRL_PLL_LD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_MT_WLAN_FUN_CTRL_WLAN_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movq	_MT_WLAN_FUN_CTRL_WLAN_CLK_EN@GOTPCREL(%rip), %rcx
	orl	%esi, %edx
	orl	(%rcx), %edx
	jmp	LBB0_3
LBB0_2:
	notl	%edx
	andl	%esi, %edx
LBB0_3:
	orl	(%rax), %ebx
	movq	_MT_WLAN_FUN_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt76_wr
	movl	$20, %edi
	callq	_udelay
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	movq	_MT_CMB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%ebx, %ecx
	movl	$2000, %r8d                     ## imm = 0x7D0
	callq	_mt76_poll
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_CMB_CTRL_XTAL_RDY,4,2       ## @MT_CMB_CTRL_XTAL_RDY
	.comm	_MT_CMB_CTRL_PLL_LD,4,2         ## @MT_CMB_CTRL_PLL_LD
	.comm	_MT_WLAN_FUN_CTRL_WLAN_EN,4,2   ## @MT_WLAN_FUN_CTRL_WLAN_EN
	.comm	_MT_WLAN_FUN_CTRL_WLAN_CLK_EN,4,2 ## @MT_WLAN_FUN_CTRL_WLAN_CLK_EN
	.comm	_MT_WLAN_FUN_CTRL,4,2           ## @MT_WLAN_FUN_CTRL
	.comm	_MT_CMB_CTRL,4,2                ## @MT_CMB_CTRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PLL and XTAL check failed\n"

	.no_dead_strip	_mt76x0_set_wlan_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x0_set_wlan_state
_mt76x0_set_wlan_state:                 ; @mt76x0_set_wlan_state
	.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	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _MT_CMB_CTRL_XTAL_RDY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_CMB_CTRL_XTAL_RDY@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MT_CMB_CTRL_PLL_LD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MT_CMB_CTRL_PLL_LD@GOTPAGEOFF]
Lloh4:
	adrp	x10, _MT_WLAN_FUN_CTRL_WLAN_EN@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MT_WLAN_FUN_CTRL_WLAN_EN@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	cbz	w2, LBB0_2
; %bb.1:
Lloh7:
	adrp	x11, _MT_WLAN_FUN_CTRL_WLAN_CLK_EN@GOTPAGE
Lloh8:
	ldr	x11, [x11, _MT_WLAN_FUN_CTRL_WLAN_CLK_EN@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	orr	w10, w10, w1
	orr	w2, w10, w11
	b	LBB0_3
LBB0_2:
	bic	w2, w1, w10
LBB0_3:
	ldr	w21, [x8]
	ldr	w22, [x9]
Lloh10:
	adrp	x8, _MT_WLAN_FUN_CTRL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MT_WLAN_FUN_CTRL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76_wr
	mov	w0, #20
	bl	_udelay
	cbz	w20, LBB0_5
; %bb.4:
	orr	w2, w22, w21
Lloh13:
	adrp	x8, _MT_CMB_CTRL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MT_CMB_CTRL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x3, x2
	mov	w4, #2000
	bl	_mt76_poll
	cbz	w0, LBB0_6
LBB0_5:
	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
LBB0_6:
	ldr	w0, [x19]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_err
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_CMB_CTRL_XTAL_RDY,4,2       ; @MT_CMB_CTRL_XTAL_RDY
	.comm	_MT_CMB_CTRL_PLL_LD,4,2         ; @MT_CMB_CTRL_PLL_LD
	.comm	_MT_WLAN_FUN_CTRL_WLAN_EN,4,2   ; @MT_WLAN_FUN_CTRL_WLAN_EN
	.comm	_MT_WLAN_FUN_CTRL_WLAN_CLK_EN,4,2 ; @MT_WLAN_FUN_CTRL_WLAN_CLK_EN
	.comm	_MT_WLAN_FUN_CTRL,4,2           ; @MT_WLAN_FUN_CTRL
	.comm	_MT_CMB_CTRL,4,2                ; @MT_CMB_CTRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PLL and XTAL check failed\n"

	.no_dead_strip	_mt76x0_set_wlan_state
.subsections_via_symbols
