	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7601u_set_wlan_state
_mt7601u_set_wlan_state:                ## @mt7601u_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	%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, %r14d
	movq	%rdi, %r15
	movq	_MT_WLAN_FUN_CTRL_WLAN_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	_MT_WLAN_FUN_CTRL_WLAN_CLK_EN@GOTPCREL(%rip), %rax
	orl	%esi, %edx
	orl	(%rax), %edx
	jmp	LBB0_3
LBB0_2:
	notl	%edx
	andl	%esi, %edx
LBB0_3:
	movq	_MT_WLAN_FUN_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mt7601u_wr
	movl	$20, %edi
	callq	_udelay
	leaq	4(%r15), %rsi
	movq	_MT7601U_STATE_WLAN_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.4:
	callq	_set_bit
	movl	$-200, %ebx
	movq	_MT_CMB_CTRL@GOTPCREL(%rip), %r14
	movq	_MT_CMB_CTRL_XTAL_RDY@GOTPCREL(%rip), %r12
	movq	_MT_CMB_CTRL_PLL_LD@GOTPCREL(%rip), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	$20, %edi
	callq	_udelay
	incl	%ebx
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_mt7601u_rr
	testl	%eax, (%r12)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%eax, (%r13)
	je	LBB0_7
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clear_bit                      ## TAILCALL
LBB0_8:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.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	_MT7601U_STATE_WLAN_RUNNING,4,2 ## @MT7601U_STATE_WLAN_RUNNING
	.comm	_MT_CMB_CTRL,4,2                ## @MT_CMB_CTRL
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: PLL and XTAL check failed!\n"

	.no_dead_strip	_mt7601u_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 mt7601u_set_wlan_state
_mt7601u_set_wlan_state:                ; @mt7601u_set_wlan_state
	.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	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _MT_WLAN_FUN_CTRL_WLAN_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_WLAN_FUN_CTRL_WLAN_EN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w2, LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _MT_WLAN_FUN_CTRL_WLAN_CLK_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MT_WLAN_FUN_CTRL_WLAN_CLK_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w8, w1
	orr	w2, w8, w9
	b	LBB0_3
LBB0_2:
	bic	w2, w1, w8
LBB0_3:
Lloh6:
	adrp	x8, _MT_WLAN_FUN_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT_WLAN_FUN_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt7601u_wr
	mov	w0, #20
	bl	_udelay
Lloh9:
	adrp	x8, _MT7601U_STATE_WLAN_RUNNING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT7601U_STATE_WLAN_RUNNING@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x1, x19, #4
	cbz	w20, LBB0_9
; %bb.4:
	bl	_set_bit
	mov	w20, #-200
Lloh12:
	adrp	x21, _MT_CMB_CTRL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _MT_CMB_CTRL@GOTPAGEOFF]
Lloh14:
	adrp	x22, _MT_CMB_CTRL_XTAL_RDY@GOTPAGE
Lloh15:
	ldr	x22, [x22, _MT_CMB_CTRL_XTAL_RDY@GOTPAGEOFF]
Lloh16:
	adrp	x23, _MT_CMB_CTRL_PLL_LD@GOTPAGE
Lloh17:
	ldr	x23, [x23, _MT_CMB_CTRL_PLL_LD@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #20
	bl	_udelay
	adds	w20, w20, #1
	b.hs	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mt7601u_rr
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.8:
	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
	ret
LBB0_9:
	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	_clear_bit
LBB0_10:
	ldr	w0, [x19]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.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	_MT7601U_STATE_WLAN_RUNNING,4,2 ; @MT7601U_STATE_WLAN_RUNNING
	.comm	_MT_CMB_CTRL,4,2                ; @MT_CMB_CTRL
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: PLL and XTAL check failed!\n"

	.no_dead_strip	_mt7601u_set_wlan_state
.subsections_via_symbols
