	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7601u_init_cal
_mt7601u_init_cal:                      ## @mt7601u_init_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	%rdi, %rbx
	callq	_mt7601u_read_bootup_temp
	movl	%eax, (%rbx)
	movq	16(%rbx), %rcx
	subl	(%rcx), %eax
	movq	_MT_EE_TEMPERATURE_SLOPE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, 4(%rbx)
	movl	%eax, 8(%rbx)
	movq	_MT_MAC_SYS_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_mt7601u_rr
	movl	%eax, %r14d
	movq	_MCU_CAL_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt7601u_mcu_calibrate
	testl	%eax, %eax
	je	LBB0_1
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_mt7601u_rf_rr
	testl	%eax, %eax
	js	LBB0_10
## %bb.2:
	orl	$128, %eax
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	movl	%eax, %ecx
	callq	_mt7601u_rf_wr
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movl	$2, %edi
	callq	_msleep
	movq	_MCU_CAL_TXDCOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt7601u_mcu_calibrate
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movq	%rbx, %rdi
	callq	_mt7601u_rxdc_cal
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mt7601u_set_bw_filter
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	_MCU_CAL_LOFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt7601u_mcu_calibrate
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movq	_MCU_CAL_TXIQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt7601u_mcu_calibrate
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	_MCU_CAL_RXIQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt7601u_mcu_calibrate
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	_MCU_CAL_DPD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	movq	%rbx, %rdi
	callq	_mt7601u_mcu_calibrate
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_mt7601u_rxdc_cal
	movq	%rbx, %rdi
	callq	_mt7601u_tssi_dc_gain_cal
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_mt7601u_wr
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mt7601u_temp_comp
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_EE_TEMPERATURE_SLOPE,4,2    ## @MT_EE_TEMPERATURE_SLOPE
	.comm	_MT_MAC_SYS_CTRL,4,2            ## @MT_MAC_SYS_CTRL
	.comm	_MCU_CAL_R,4,2                  ## @MCU_CAL_R
	.comm	_MCU_CAL_TXDCOC,4,2             ## @MCU_CAL_TXDCOC
	.comm	_MCU_CAL_LOFT,4,2               ## @MCU_CAL_LOFT
	.comm	_MCU_CAL_TXIQ,4,2               ## @MCU_CAL_TXIQ
	.comm	_MCU_CAL_RXIQ,4,2               ## @MCU_CAL_RXIQ
	.comm	_MCU_CAL_DPD,4,2                ## @MCU_CAL_DPD
	.no_dead_strip	_mt7601u_init_cal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7601u_init_cal
_mt7601u_init_cal:                      ; @mt7601u_init_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	x19, x0
	bl	_mt7601u_read_bootup_temp
	str	w0, [x19]
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	sub	w8, w0, w8
Lloh0:
	adrp	x9, _MT_EE_TEMPERATURE_SLOPE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MT_EE_TEMPERATURE_SLOPE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w8, w8, w9
	stp	w8, w8, [x19, #4]
Lloh3:
	adrp	x21, _MT_MAC_SYS_CTRL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MT_MAC_SYS_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mt7601u_rr
	mov	x20, x0
Lloh5:
	adrp	x8, _MCU_CAL_R@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MCU_CAL_R@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt7601u_mcu_calibrate
	cbz	w0, LBB0_2
LBB0_1:
	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_2:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_mt7601u_rf_rr
	tbnz	w0, #31, LBB0_1
; %bb.3:
	orr	w3, w0, #0x80
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_mt7601u_rf_wr
	cbnz	w0, LBB0_1
; %bb.4:
	mov	w0, #2
	bl	_msleep
Lloh8:
	adrp	x8, _MCU_CAL_TXDCOC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MCU_CAL_TXDCOC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt7601u_mcu_calibrate
	cbnz	w0, LBB0_1
; %bb.5:
	mov	x0, x19
	bl	_mt7601u_rxdc_cal
	mov	x0, x19
	mov	w1, #1
	bl	_mt7601u_set_bw_filter
	cbnz	w0, LBB0_1
; %bb.6:
Lloh11:
	adrp	x8, _MCU_CAL_LOFT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MCU_CAL_LOFT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt7601u_mcu_calibrate
	cbnz	w0, LBB0_1
; %bb.7:
Lloh14:
	adrp	x8, _MCU_CAL_TXIQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MCU_CAL_TXIQ@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt7601u_mcu_calibrate
	cbnz	w0, LBB0_1
; %bb.8:
Lloh17:
	adrp	x8, _MCU_CAL_RXIQ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MCU_CAL_RXIQ@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt7601u_mcu_calibrate
	cbnz	w0, LBB0_1
; %bb.9:
Lloh20:
	adrp	x8, _MCU_CAL_DPD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MCU_CAL_DPD@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	mov	x0, x19
	bl	_mt7601u_mcu_calibrate
	cbnz	w0, LBB0_1
; %bb.10:
	mov	x0, x19
	bl	_mt7601u_rxdc_cal
	mov	x0, x19
	bl	_mt7601u_tssi_dc_gain_cal
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_mt7601u_wr
	mov	x0, x19
	mov	w1, #1
	bl	_mt7601u_temp_comp
	mov	w0, #0
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_EE_TEMPERATURE_SLOPE,4,2    ; @MT_EE_TEMPERATURE_SLOPE
	.comm	_MT_MAC_SYS_CTRL,4,2            ; @MT_MAC_SYS_CTRL
	.comm	_MCU_CAL_R,4,2                  ; @MCU_CAL_R
	.comm	_MCU_CAL_TXDCOC,4,2             ; @MCU_CAL_TXDCOC
	.comm	_MCU_CAL_LOFT,4,2               ; @MCU_CAL_LOFT
	.comm	_MCU_CAL_TXIQ,4,2               ; @MCU_CAL_TXIQ
	.comm	_MCU_CAL_RXIQ,4,2               ; @MCU_CAL_RXIQ
	.comm	_MCU_CAL_DPD,4,2                ; @MCU_CAL_DPD
	.no_dead_strip	_mt7601u_init_cal
.subsections_via_symbols
