	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar5008_hw_set_rfmode
_ar5008_hw_set_rfmode:                  ## @ar5008_hw_set_rfmode
	.cfi_startproc
## %bb.0:
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.1:
	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	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_IS_CHAN_2GHZ
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	_AR_PHY_MODE_OFDM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_10:
	retq
LBB0_2:
	movq	_AR_PHY_MODE_DYNAMIC@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_AR_SREV_9280_20_OR_LATER
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	%rbx, %rdi
	callq	_IS_CHAN_5GHZ
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	movq	_AR_PHY_MODE_RF2GHZ@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_AR_PHY_MODE_RF5GHZ@GOTPCREL(%rip), %rax
LBB0_8:
	orl	(%rax), %r15d
LBB0_9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_IS_CHAN_A_FAST_CLOCK
	movq	_AR_PHY_MODE_DYNAMIC@GOTPCREL(%rip), %rcx
	movq	_AR_PHY_MODE_DYN_CCK_DISABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	xorl	%edx, %edx
	testq	%rax, %rax
	cmovnel	%esi, %edx
	orl	%r15d, %edx
	movq	_AR_PHY_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_MODE_DYNAMIC,4,2        ## @AR_PHY_MODE_DYNAMIC
	.comm	_AR_PHY_MODE_OFDM,4,2           ## @AR_PHY_MODE_OFDM
	.comm	_AR_PHY_MODE_RF5GHZ,4,2         ## @AR_PHY_MODE_RF5GHZ
	.comm	_AR_PHY_MODE_RF2GHZ,4,2         ## @AR_PHY_MODE_RF2GHZ
	.comm	_AR_PHY_MODE_DYN_CCK_DISABLE,4,2 ## @AR_PHY_MODE_DYN_CCK_DISABLE
	.comm	_AR_PHY_MODE,4,2                ## @AR_PHY_MODE
	.no_dead_strip	_ar5008_hw_set_rfmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar5008_hw_set_rfmode
_ar5008_hw_set_rfmode:                  ; @ar5008_hw_set_rfmode
	.cfi_startproc
; %bb.0:
	cbz	x1, LBB0_4
; %bb.1:
	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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_IS_CHAN_2GHZ
Lloh0:
	adrp	x8, _AR_PHY_MODE_OFDM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_PHY_MODE_OFDM@GOTPAGEOFF]
Lloh2:
	adrp	x22, _AR_PHY_MODE_DYNAMIC@GOTPAGE
Lloh3:
	ldr	x22, [x22, _AR_PHY_MODE_DYNAMIC@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x22, eq
	ldr	w21, [x8]
	mov	x0, x19
	bl	_AR_SREV_9280_20_OR_LATER
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_IS_CHAN_5GHZ
Lloh4:
	adrp	x8, _AR_PHY_MODE_RF5GHZ@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AR_PHY_MODE_RF5GHZ@GOTPAGEOFF]
Lloh6:
	adrp	x9, _AR_PHY_MODE_RF2GHZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AR_PHY_MODE_RF2GHZ@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	bl	_IS_CHAN_A_FAST_CLOCK
Lloh8:
	adrp	x8, _AR_PHY_MODE_DYN_CCK_DISABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AR_PHY_MODE_DYN_CCK_DISABLE@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh10:
	ldr	w8, [x8]
	orr	w8, w8, w9
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w2, w8, w21
Lloh11:
	adrp	x8, _AR_PHY_MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR_PHY_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	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_WRITE
LBB0_4:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_MODE_DYNAMIC,4,2        ; @AR_PHY_MODE_DYNAMIC
	.comm	_AR_PHY_MODE_OFDM,4,2           ; @AR_PHY_MODE_OFDM
	.comm	_AR_PHY_MODE_RF5GHZ,4,2         ; @AR_PHY_MODE_RF5GHZ
	.comm	_AR_PHY_MODE_RF2GHZ,4,2         ; @AR_PHY_MODE_RF2GHZ
	.comm	_AR_PHY_MODE_DYN_CCK_DISABLE,4,2 ; @AR_PHY_MODE_DYN_CCK_DISABLE
	.comm	_AR_PHY_MODE,4,2                ; @AR_PHY_MODE
	.no_dead_strip	_ar5008_hw_set_rfmode
.subsections_via_symbols
