	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mt7601u_phy_freq_cal
___mt7601u_phy_freq_cal:                ## @__mt7601u_phy_freq_cal
	.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	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rdx, %rsi
	movq	%r15, %rdx
	callq	_trace_freq_cal_offset
	movq	_MT_FREQ_OFFSET_INVALID@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_2
LBB0_1:
	movq	_MT_FREQ_CAL_ADJ_INTERVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_2:
	leaq	-128(%rbx), %rax
	cmpq	$4, %rax
	jae	LBB0_9
## %bb.3:
	leaq	l_switch.table.__mt7601u_phy_freq_cal(%rip), %rdx
	leaq	l_switch.table.__mt7601u_phy_freq_cal.1(%rip), %rax
	movq	-1024(%rax,%rbx,8), %rax
	movq	%r15, %rcx
	negq	%rcx
	cmovsq	%r15, %rcx
	cmpq	-1024(%rdx,%rbx,8), %rcx
	jae	LBB0_10
## %bb.4:
	cmpq	%rax, %rcx
	jbe	LBB0_14
## %bb.5:
	cmpl	$0, (%r14)
	je	LBB0_17
## %bb.6:
	cmpq	%r15, %rax
	jge	LBB0_11
LBB0_7:
	movl	4(%r14), %esi
	testl	%esi, %esi
	jle	LBB0_15
## %bb.8:
	decl	%esi
	movl	%esi, 4(%r14)
	jmp	LBB0_16
LBB0_9:
	movl	$1, %edi
	callq	_WARN_ON
	jmp	LBB0_17
LBB0_10:
	movl	$1, (%r14)
	cmpq	%r15, %rax
	jl	LBB0_7
LBB0_11:
	negq	%rax
	movl	4(%r14), %esi
	cmpq	%r15, %rax
	jle	LBB0_16
## %bb.12:
	cmpl	$190, %esi
	jg	LBB0_15
## %bb.13:
	incl	%esi
	movl	%esi, 4(%r14)
	jmp	LBB0_16
LBB0_14:
	movl	$0, (%r14)
	jmp	LBB0_17
LBB0_15:
	movl	$0, (%r14)
LBB0_16:
	movq	%r14, %rdi
	callq	_trace_freq_cal_adjust
	movl	4(%r14), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_mt7601u_rf_wr
	movq	%r14, %rdi
	callq	_mt7601u_vco_cal
	cmpl	$0, (%r14)
	jne	LBB0_1
LBB0_17:
	movq	_MT_FREQ_CAL_CHECK_INTERVAL@GOTPCREL(%rip), %rax
LBB0_18:
	movq	(%rax), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_FREQ_OFFSET_INVALID,8,3     ## @MT_FREQ_OFFSET_INVALID
	.comm	_MT_FREQ_CAL_ADJ_INTERVAL,8,3   ## @MT_FREQ_CAL_ADJ_INTERVAL
	.comm	_MT_FREQ_CAL_CHECK_INTERVAL,8,3 ## @MT_FREQ_CAL_CHECK_INTERVAL
	.no_dead_strip	___mt7601u_phy_freq_cal
	.section	__TEXT,__const
	.p2align	3                               ## @switch.table.__mt7601u_phy_freq_cal
l_switch.table.__mt7601u_phy_freq_cal:
	.quad	102                             ## 0x66
	.quad	82                              ## 0x52
	.quad	82                              ## 0x52
	.quad	19                              ## 0x13

	.p2align	3                               ## @switch.table.__mt7601u_phy_freq_cal.1
l_switch.table.__mt7601u_phy_freq_cal.1:
	.quad	32                              ## 0x20
	.quad	20                              ## 0x14
	.quad	20                              ## 0x14
	.quad	5                               ## 0x5

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mt7601u_phy_freq_cal
___mt7601u_phy_freq_cal:                ; @__mt7601u_phy_freq_cal
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x1, x2
	mov	x2, x20
	bl	_trace_freq_cal_offset
Lloh0:
	adrp	x8, _MT_FREQ_OFFSET_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_FREQ_OFFSET_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MT_FREQ_CAL_ADJ_INTERVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_FREQ_CAL_ADJ_INTERVAL@GOTPAGEOFF]
	b	LBB0_19
LBB0_2:
	sub	x8, x21, #128
	cmp	x8, #4
	b.hs	LBB0_9
; %bb.3:
	lsl	x8, x8, #3
Lloh5:
	adrp	x9, l_switch.table.__mt7601u_phy_freq_cal@PAGE
Lloh6:
	add	x9, x9, l_switch.table.__mt7601u_phy_freq_cal@PAGEOFF
	ldr	x10, [x9, x8]
Lloh7:
	adrp	x9, l_switch.table.__mt7601u_phy_freq_cal.1@PAGE
Lloh8:
	add	x9, x9, l_switch.table.__mt7601u_phy_freq_cal.1@PAGEOFF
	ldr	x8, [x9, x8]
	cmp	x20, #0
	cneg	x9, x20, mi
	cmp	x9, x10
	b.hs	LBB0_10
; %bb.4:
	cmp	x9, x8
	b.ls	LBB0_14
; %bb.5:
	ldr	w9, [x19]
	cbz	w9, LBB0_15
; %bb.6:
	cmp	x8, x20
	b.ge	LBB0_11
LBB0_7:
	ldr	w8, [x19, #4]
	subs	w1, w8, #1
	b.lt	LBB0_16
; %bb.8:
	str	w1, [x19, #4]
	b	LBB0_18
LBB0_9:
	mov	w0, #1
	bl	_WARN_ON
	b	LBB0_15
LBB0_10:
	mov	w9, #1
	str	w9, [x19]
	cmp	x8, x20
	b.lt	LBB0_7
LBB0_11:
	ldr	w1, [x19, #4]
	neg	x8, x8
	cmp	x8, x20
	b.le	LBB0_18
; %bb.12:
	cmp	w1, #190
	b.gt	LBB0_17
; %bb.13:
	add	w1, w1, #1
	str	w1, [x19, #4]
	b	LBB0_18
LBB0_14:
	str	wzr, [x19]
LBB0_15:
Lloh9:
	adrp	x8, _MT_FREQ_CAL_CHECK_INTERVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT_FREQ_CAL_CHECK_INTERVAL@GOTPAGEOFF]
	b	LBB0_19
LBB0_16:
	str	wzr, [x19]
	mov	x1, x8
	b	LBB0_18
LBB0_17:
	str	wzr, [x19]
LBB0_18:
	mov	x0, x19
	bl	_trace_freq_cal_adjust
	ldr	w3, [x19, #4]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #12
	bl	_mt7601u_rf_wr
	mov	x0, x19
	bl	_mt7601u_vco_cal
Lloh11:
	adrp	x8, _MT_FREQ_CAL_ADJ_INTERVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT_FREQ_CAL_ADJ_INTERVAL@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh13:
	adrp	x10, _MT_FREQ_CAL_CHECK_INTERVAL@GOTPAGE
Lloh14:
	ldr	x10, [x10, _MT_FREQ_CAL_CHECK_INTERVAL@GOTPAGEOFF]
	cmp	w9, #0
	csel	x8, x10, x8, eq
LBB0_19:
	ldr	x0, [x8]
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_FREQ_OFFSET_INVALID,8,3     ; @MT_FREQ_OFFSET_INVALID
	.comm	_MT_FREQ_CAL_ADJ_INTERVAL,8,3   ; @MT_FREQ_CAL_ADJ_INTERVAL
	.comm	_MT_FREQ_CAL_CHECK_INTERVAL,8,3 ; @MT_FREQ_CAL_CHECK_INTERVAL
	.no_dead_strip	___mt7601u_phy_freq_cal
	.section	__TEXT,__const
	.p2align	3                               ; @switch.table.__mt7601u_phy_freq_cal
l_switch.table.__mt7601u_phy_freq_cal:
	.quad	102                             ; 0x66
	.quad	82                              ; 0x52
	.quad	82                              ; 0x52
	.quad	19                              ; 0x13

	.p2align	3                               ; @switch.table.__mt7601u_phy_freq_cal.1
l_switch.table.__mt7601u_phy_freq_cal.1:
	.quad	32                              ; 0x20
	.quad	20                              ; 0x14
	.quad	20                              ; 0x14
	.quad	5                               ; 0x5

.subsections_via_symbols
