	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_thermo_cal_apply
_ar9003_hw_thermo_cal_apply:            ## @ar9003_hw_thermo_cal_apply
	.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	_AR_SREV_9462_20_OR_LATER
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ar9300_otp_read_word
	movl	-28(%rbp), %eax
	movzbl	%al, %ecx
	movzbl	%ah, %edx
	movl	%ecx, %eax
	orl	%edx, %eax
	je	LBB0_3
## %bb.2:
	movq	_AR_PHY_BB_THERM_ADC_3@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET@GOTPCREL(%rip), %rax
	movl	%edx, %r15d
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_RMW_FIELD
	movl	(%r14), %esi
	movq	_AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	$256, %r15d                     ## imm = 0x100
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_REG_RMW_FIELD
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_BB_THERM_ADC_3,4,2      ## @AR_PHY_BB_THERM_ADC_3
	.comm	_AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET,4,2 ## @AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET
	.comm	_AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN,4,2 ## @AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN
	.no_dead_strip	_ar9003_hw_thermo_cal_apply
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_thermo_cal_apply
_ar9003_hw_thermo_cal_apply:            ; @ar9003_hw_thermo_cal_apply
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_AR_SREV_9462_20_OR_LATER
	cbz	w0, LBB0_3
; %bb.1:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #1
	bl	_ar9300_otp_read_word
	ldr	w8, [sp, #12]
	and	w3, w8, #0xff
	ubfx	w20, w8, #8, #8
	orr	w8, w3, w20
	cbz	w8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x21, _AR_PHY_BB_THERM_ADC_3@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AR_PHY_BB_THERM_ADC_3@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_RMW_FIELD
	ldr	w1, [x21]
Lloh5:
	adrp	x8, _AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	orr	w3, w20, #0x100
	mov	x0, x19
	bl	_REG_RMW_FIELD
LBB0_3:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_BB_THERM_ADC_3,4,2      ; @AR_PHY_BB_THERM_ADC_3
	.comm	_AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET,4,2 ; @AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET
	.comm	_AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN,4,2 ; @AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN
	.no_dead_strip	_ar9003_hw_thermo_cal_apply
.subsections_via_symbols
