	.file	"extr_phy.c_mt7601u_temp_comp.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Recalibrate DPD\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"PLL lock protect on - too cold\n"
	.section	.rodata.str1.1
.LC2:
	.string	"PLL lock protect off\n"
.LC3:
	.string	"high"
.LC4:
	.string	"normal"
.LC5:
	.string	"low"
	.text
	.p2align 4
	.type	mt7601u_temp_comp, @function
mt7601u_temp_comp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR 24[rdi]
	mov	ebx, DWORD PTR [rdi]
	sub	ebx, DWORD PTR [rax]
	imul	ebx, DWORD PTR MT_EE_TEMPERATURE_SLOPE[rip]
	mov	eax, ebx
	sub	eax, DWORD PTR 8[rdi]
	mov	DWORD PTR 4[rdi], ebx
	add	eax, 450
	cmp	eax, 900
	ja	.L18
.L2:
	cmp	ebx, -50
	jl	.L19
	cmp	ebx, 50
	jle	.L8
	mov	eax, DWORD PTR 12[rbp]
	test	eax, eax
	jne	.L20
.L8:
	cmp	r12d, 1
	mov	esi, DWORD PTR MT_TEMP_MODE_HIGH[rip]
	lea	rdx, .LC3[rip]
	sbb	eax, eax
	and	eax, 50
	add	eax, 350
	cmp	eax, ebx
	jl	.L15
.L10:
	mov	esi, DWORD PTR MT_TEMP_MODE_NORMAL[rip]
	lea	rdx, .LC4[rip]
.L15:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	mt7601u_bbp_temp@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	edx, DWORD PTR 12[rbp]
	test	edx, edx
	je	.L21
	cmp	r12d, 1
	sbb	eax, eax
	and	eax, 50
	sub	eax, 250
.L7:
	mov	esi, DWORD PTR MT_TEMP_MODE_LOW[rip]
	lea	rdx, .LC5[rip]
	cmp	ebx, eax
	jg	.L10
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	mt7601u_bbp_temp@PLT
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	DWORD PTR 8[rdi], ebx
	mov	esi, DWORD PTR MCU_CAL_DPD[rip]
	mov	edx, ebx
	call	mt7601u_mcu_calibrate@PLT
	test	eax, eax
	je	.L22
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	rdi, rbp
	call	mt7601u_vco_cal@PLT
	mov	edi, DWORD PTR 16[rbp]
	lea	rsi, .LC0[rip]
	call	dev_dbg@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L21:
	mov	DWORD PTR 12[rbp], 1
	mov	ecx, 6
	mov	edx, 4
	mov	rdi, rbp
	mov	esi, 4
	call	mt7601u_rf_wr@PLT
	mov	ecx, 48
	mov	edx, 10
	mov	rdi, rbp
	mov	esi, 4
	call	mt7601u_rf_clear@PLT
	mov	edi, DWORD PTR 16[rbp]
	lea	rsi, .LC1[rip]
	call	dev_dbg@PLT
	cmp	r12d, 1
	sbb	eax, eax
	and	eax, 50
	sub	eax, 250
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	xor	ecx, ecx
	mov	rdi, rbp
	mov	edx, 4
	mov	esi, 4
	mov	DWORD PTR 12[rbp], 0
	call	mt7601u_rf_wr@PLT
	mov	rdi, rbp
	mov	r8d, 16
	mov	ecx, 48
	mov	edx, 10
	mov	esi, 4
	call	mt7601u_rf_rmw@PLT
	mov	edi, DWORD PTR 16[rbp]
	lea	rsi, .LC2[rip]
	call	dev_dbg@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	mt7601u_temp_comp, .-mt7601u_temp_comp
	.comm	MT_TEMP_MODE_NORMAL,4,4
	.comm	MT_TEMP_MODE_LOW,4,4
	.comm	MT_TEMP_MODE_HIGH,4,4
	.comm	MT_EE_TEMPERATURE_SLOPE,4,4
	.comm	MCU_CAL_DPD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_phy.c_mt7601u_temp_comp.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Recalibrate DPD\012\000"
	.align	2
.LC1:
	.ascii	"PLL lock protect on - too cold\012\000"
	.align	2
.LC2:
	.ascii	"PLL lock protect off\012\000"
	.align	2
.LC3:
	.ascii	"high\000"
	.align	2
.LC4:
	.ascii	"normal\000"
	.align	2
.LC5:
	.ascii	"low\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt7601u_temp_comp, %function
mt7601u_temp_comp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, [r0, #20]
	ldr	r3, .L26
	push	{r4, r5, r6, lr}
	ldr	r2, [r2]
	ldr	r5, [r0]
	ldr	r3, [r3]
	sub	r5, r5, r2
	mul	r5, r3, r5
	ldr	r3, [r0, #8]
	mov	r4, r0
	sub	r3, r5, r3
	add	r3, r3, #448
	add	r3, r3, #2
	cmp	r3, #900
	mov	r6, r1
	sub	sp, sp, #8
	str	r5, [r0, #4]
	bhi	.L20
.L2:
	cmn	r5, #50
	blt	.L21
	cmp	r5, #50
	ble	.L8
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L22
.L8:
	cmp	r6, #0
	ldr	r3, .L26+4
	moveq	r3, #400
	cmp	r3, r5
	blt	.L23
.L10:
	mov	r0, r4
	ldr	r3, .L26+8
	ldr	r2, .L26+12
	ldr	r1, [r3]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	mt7601u_bbp_temp
.L21:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L24
	cmp	r6, #0
	mvnne	r3, #249
	mvneq	r3, #199
.L7:
	cmp	r5, r3
	bgt	.L10
	mov	r0, r4
	ldr	r3, .L26+16
	ldr	r2, .L26+20
	ldr	r1, [r3]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	mt7601u_bbp_temp
.L20:
	ldr	r3, .L26+24
	mov	r2, r5
	ldr	r1, [r3]
	str	r5, [r0, #8]
	bl	mt7601u_mcu_calibrate
	cmp	r0, #0
	beq	.L25
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L25:
	mov	r0, r4
	bl	mt7601u_vco_cal
	ldr	r1, .L26+28
	ldr	r0, [r4, #16]
	bl	dev_dbg
	b	.L2
.L23:
	mov	r0, r4
	ldr	r3, .L26+32
	ldr	r2, .L26+36
	ldr	r1, [r3]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	mt7601u_bbp_temp
.L24:
	mov	r2, #4
	mov	r3, #1
	mov	r1, r2
	str	r3, [r4, #12]
	mov	r0, r4
	mov	r3, #6
	bl	mt7601u_rf_wr
	mov	r3, #48
	mov	r2, #10
	mov	r1, #4
	mov	r0, r4
	bl	mt7601u_rf_clear
	ldr	r1, .L26+40
	ldr	r0, [r4, #16]
	bl	dev_dbg
	cmp	r6, #0
	mvnne	r3, #249
	mvneq	r3, #199
	b	.L7
.L22:
	mov	r3, #0
	mov	r2, #4
	str	r3, [r4, #12]
	mov	r1, r2
	mov	r0, r4
	bl	mt7601u_rf_wr
	mov	r2, #16
	mov	r3, #48
	str	r2, [sp]
	mov	r1, #4
	mov	r2, #10
	mov	r0, r4
	bl	mt7601u_rf_rmw
	ldr	r1, .L26+44
	ldr	r0, [r4, #16]
	bl	dev_dbg
	b	.L8
.L27:
	.align	2
.L26:
	.word	MT_EE_TEMPERATURE_SLOPE
	.word	350
	.word	MT_TEMP_MODE_NORMAL
	.word	.LC4
	.word	MT_TEMP_MODE_LOW
	.word	.LC5
	.word	MCU_CAL_DPD
	.word	.LC0
	.word	MT_TEMP_MODE_HIGH
	.word	.LC3
	.word	.LC1
	.word	.LC2
	.size	mt7601u_temp_comp, .-mt7601u_temp_comp
	.comm	MT_TEMP_MODE_NORMAL,4,4
	.comm	MT_TEMP_MODE_LOW,4,4
	.comm	MT_TEMP_MODE_HIGH,4,4
	.comm	MT_EE_TEMPERATURE_SLOPE,4,4
	.comm	MCU_CAL_DPD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
