	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_paprd_is_done           ## -- Begin function ar9003_paprd_is_done
	.p2align	4, 0x90
_ar9003_paprd_is_done:                  ## @ar9003_paprd_is_done
	.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_PAPRD_TRAINER_STAT1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_REG_READ_FIELD
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_AR_SREV_9485
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	cmpl	$1, %ebx
	jne	LBB0_3
## %bb.2:
	movl	(%r15), %esi
	movq	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_REG_READ_FIELD
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_ath9k_hw_common
	movq	_CALIBRATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	movl	%r15d, %ecx
	movl	$1, %r8d
	callq	_ath_dbg
	movq	_PAPRD_IDEAL_AGC2_PWR_RANGE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	(%rax), %r15d
	setg	%bl
LBB0_3:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setne	%al
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1,4,2 ## @AR_PHY_PAPRD_TRAINER_STAT1
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE,4,2 ## @AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR,4,2 ## @AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR
	.comm	_CALIBRATE,4,2                  ## @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AGC2_PWR = 0x%x training done = 0x%x\n"

	.comm	_PAPRD_IDEAL_AGC2_PWR_RANGE,4,2 ## @PAPRD_IDEAL_AGC2_PWR_RANGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_paprd_is_done           ; -- Begin function ar9003_paprd_is_done
	.p2align	2
_ar9003_paprd_is_done:                  ; @ar9003_paprd_is_done
	.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	x21, _AR_PHY_PAPRD_TRAINER_STAT1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AR_PHY_PAPRD_TRAINER_STAT1@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_REG_READ_FIELD
	mov	x20, x0
	mov	x0, x19
	bl	_AR_SREV_9485
	cbnz	x0, LBB0_3
; %bb.1:
	cmp	w20, #1
	b.ne	LBB0_3
; %bb.2:
	ldr	w1, [x21]
Lloh5:
	adrp	x8, _AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_READ_FIELD
	mov	x20, x0
	mov	x0, x19
	bl	_ath9k_hw_common
Lloh8:
	adrp	x8, _CALIBRATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CALIBRATE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x20
	mov	w4, #1
	bl	_ath_dbg
Lloh13:
	adrp	x8, _PAPRD_IDEAL_AGC2_PWR_RANGE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PAPRD_IDEAL_AGC2_PWR_RANGE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w20, w8
	cset	w20, gt
LBB0_3:
	cmp	w20, #0
	cset	w0, ne
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1,4,2 ; @AR_PHY_PAPRD_TRAINER_STAT1
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE,4,2 ; @AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR,4,2 ; @AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR
	.comm	_CALIBRATE,4,2                  ; @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AGC2_PWR = 0x%x training done = 0x%x\n"

	.comm	_PAPRD_IDEAL_AGC2_PWR_RANGE,4,2 ; @PAPRD_IDEAL_AGC2_PWR_RANGE
.subsections_via_symbols
