	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9002_hw_compute_pll_control
_ar9002_hw_compute_pll_control:         ## @ar9002_hw_compute_pll_control
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	$44, %r14d
	movl	$5, %ebx
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r12
	movq	%r15, %rdi
	callq	_IS_CHAN_5GHZ
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_IS_CHAN_A_FAST_CLOCK
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_AR_SREV_9280_20
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	leal	5(%rcx,%rcx,4), %ebx
	movl	$40, %eax
	movl	$80, %r14d
	cmovel	%eax, %r14d
LBB0_4:
	movq	_AR_RTC_9160_PLL_REFDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_SM
	movl	%eax, %r12d
	movq	_AR_RTC_9160_PLL_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_SM
	movl	%eax, %ebx
	orl	%r12d, %ebx
	testq	%r15, %r15
	je	LBB0_8
## %bb.5:
	movq	%r15, %rdi
	callq	_IS_CHAN_HALF_RATE
	movl	$1, %edi
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_IS_CHAN_QUARTER_RATE
	movl	$2, %edi
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	movq	_AR_RTC_9160_PLL_CLKSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SM
	orl	%eax, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_RTC_9160_PLL_REFDIV,4,2     ## @AR_RTC_9160_PLL_REFDIV
	.comm	_AR_RTC_9160_PLL_DIV,4,2        ## @AR_RTC_9160_PLL_DIV
	.comm	_AR_RTC_9160_PLL_CLKSEL,4,2     ## @AR_RTC_9160_PLL_CLKSEL
	.no_dead_strip	_ar9002_hw_compute_pll_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9002_hw_compute_pll_control
_ar9002_hw_compute_pll_control:         ; @ar9002_hw_compute_pll_control
	.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, x1
	cbz	x1, LBB0_4
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_IS_CHAN_5GHZ
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x21
	mov	x1, x19
	bl	_IS_CHAN_A_FAST_CLOCK
	mov	w20, #5
	cbz	w0, LBB0_5
; %bb.3:
	mov	w21, #44
	b	LBB0_6
LBB0_4:
	mov	w21, #44
	mov	w20, #5
	b	LBB0_6
LBB0_5:
	mov	x0, x21
	bl	_AR_SREV_9280_20
	cmp	x0, #0
	mov	w8, #10
	csel	w20, w20, w8, eq
	mov	w8, #80
	mov	w9, #40
	csel	w21, w9, w8, eq
LBB0_6:
Lloh0:
	adrp	x8, _AR_RTC_9160_PLL_REFDIV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_RTC_9160_PLL_REFDIV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_SM
	mov	x20, x0
Lloh3:
	adrp	x8, _AR_RTC_9160_PLL_DIV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_RTC_9160_PLL_DIV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_SM
	orr	w20, w0, w20
	cbz	x19, LBB0_12
; %bb.7:
	mov	x0, x19
	bl	_IS_CHAN_HALF_RATE
	cbz	x0, LBB0_9
; %bb.8:
	mov	w0, #1
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_IS_CHAN_QUARTER_RATE
	cbz	x0, LBB0_12
; %bb.10:
	mov	w0, #2
LBB0_11:
Lloh6:
	adrp	x8, _AR_RTC_9160_PLL_CLKSEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR_RTC_9160_PLL_CLKSEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_SM
	orr	w20, w0, w20
LBB0_12:
	mov	x0, 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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_RTC_9160_PLL_REFDIV,4,2     ; @AR_RTC_9160_PLL_REFDIV
	.comm	_AR_RTC_9160_PLL_DIV,4,2        ; @AR_RTC_9160_PLL_DIV
	.comm	_AR_RTC_9160_PLL_CLKSEL,4,2     ; @AR_RTC_9160_PLL_CLKSEL
	.no_dead_strip	_ar9002_hw_compute_pll_control
.subsections_via_symbols
