	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9287_hw_olc_temp_compensation
_ar9287_hw_olc_temp_compensation:       ## @ar9287_hw_olc_temp_compensation
	.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, %r14
	movq	_AR_PHY_TX_PWRCTRL4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_REG_READ
	movq	_AR_PHY_TX_PWRCTRL_PD_AVG_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_MS
	cmpq	$0, (%r14)
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	8(%r14), %rax
	movq	_EEP_TEMPSENSE_SLOPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rcx
	subq	(%r14), %rbx
	shlq	$2, %rbx
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rbx
	jmp	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_5:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
LBB0_7:
	movq	_AR_PHY_CH0_TX_PWRCTRL11@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rcx
	callq	_REG_RMW_FIELD
	movq	_AR_PHY_CH1_TX_PWRCTRL11@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_RMW_FIELD                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_TX_PWRCTRL4,4,2         ## @AR_PHY_TX_PWRCTRL4
	.comm	_AR_PHY_TX_PWRCTRL_PD_AVG_OUT,4,2 ## @AR_PHY_TX_PWRCTRL_PD_AVG_OUT
	.comm	_EEP_TEMPSENSE_SLOPE,4,2        ## @EEP_TEMPSENSE_SLOPE
	.comm	_AR_PHY_CH0_TX_PWRCTRL11,4,2    ## @AR_PHY_CH0_TX_PWRCTRL11
	.comm	_AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP,4,2 ## @AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP
	.comm	_AR_PHY_CH1_TX_PWRCTRL11,4,2    ## @AR_PHY_CH1_TX_PWRCTRL11
	.no_dead_strip	_ar9287_hw_olc_temp_compensation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9287_hw_olc_temp_compensation
_ar9287_hw_olc_temp_compensation:       ; @ar9287_hw_olc_temp_compensation
	.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
Lloh0:
	adrp	x8, _AR_PHY_TX_PWRCTRL4@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_PHY_TX_PWRCTRL4@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_REG_READ
Lloh3:
	adrp	x8, _AR_PHY_TX_PWRCTRL_PD_AVG_OUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_PHY_TX_PWRCTRL_PD_AVG_OUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_MS
	ldr	x8, [x19]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.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	x20, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _EEP_TEMPSENSE_SLOPE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EEP_TEMPSENSE_SLOPE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19]
	sub	x8, x20, x8
	lsl	x8, x8, #2
	sdiv	x20, x8, x0
	b	LBB0_5
LBB0_4:
	mov	x20, #0
LBB0_5:
Lloh9:
	adrp	x8, _AR_PHY_CH0_TX_PWRCTRL11@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR_PHY_CH0_TX_PWRCTRL11@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x21, _AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP@GOTPAGE
Lloh13:
	ldr	x21, [x21, _AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	x3, x20
	bl	_REG_RMW_FIELD
Lloh14:
	adrp	x8, _AR_PHY_CH1_TX_PWRCTRL11@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR_PHY_CH1_TX_PWRCTRL11@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	mov	x3, x20
	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
	b	_REG_RMW_FIELD
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_TX_PWRCTRL4,4,2         ; @AR_PHY_TX_PWRCTRL4
	.comm	_AR_PHY_TX_PWRCTRL_PD_AVG_OUT,4,2 ; @AR_PHY_TX_PWRCTRL_PD_AVG_OUT
	.comm	_EEP_TEMPSENSE_SLOPE,4,2        ; @EEP_TEMPSENSE_SLOPE
	.comm	_AR_PHY_CH0_TX_PWRCTRL11,4,2    ; @AR_PHY_CH0_TX_PWRCTRL11
	.comm	_AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP,4,2 ; @AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP
	.comm	_AR_PHY_CH1_TX_PWRCTRL11,4,2    ; @AR_PHY_CH1_TX_PWRCTRL11
	.no_dead_strip	_ar9287_hw_olc_temp_compensation
.subsections_via_symbols
