	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_set_rfmode
_ar9003_hw_set_rfmode:                  ## @ar9003_hw_set_rfmode
	.cfi_startproc
## %bb.0:
	testq	%rsi, %rsi
	je	LBB0_7
## %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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_IS_CHAN_2GHZ
	movq	_AR_PHY_MODE_DYNAMIC@GOTPCREL(%rip), %r15
	movq	%r15, %rcx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_AR_PHY_MODE_OFDM@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %r12d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_IS_CHAN_A_FAST_CLOCK
	movq	_AR_PHY_MODE_DYN_CCK_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%r15), %ecx
	xorl	%r15d, %r15d
	testq	%rax, %rax
	cmovnel	%ecx, %r15d
	orl	%r12d, %r15d
	movq	%rbx, %rdi
	callq	_IS_CHAN_HALF_RATE
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_IS_CHAN_QUARTER_RATE
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	_AR_PHY_FRAME_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$3, %ecx
	callq	_REG_RMW_FIELD
LBB0_6:
	movq	_AR_PHY_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
LBB0_7:
	retq
	.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_DYN_CCK_DISABLE,4,2 ## @AR_PHY_MODE_DYN_CCK_DISABLE
	.comm	_AR_PHY_FRAME_CTL,4,2           ## @AR_PHY_FRAME_CTL
	.comm	_AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW,4,2 ## @AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW
	.comm	_AR_PHY_MODE,4,2                ## @AR_PHY_MODE
	.no_dead_strip	_ar9003_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 ar9003_hw_set_rfmode
_ar9003_hw_set_rfmode:                  ; @ar9003_hw_set_rfmode
	.cfi_startproc
; %bb.0:
	cbz	x1, LBB0_5
; %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	x21, _AR_PHY_MODE_DYNAMIC@GOTPAGE
Lloh3:
	ldr	x21, [x21, _AR_PHY_MODE_DYNAMIC@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x21, eq
	ldr	w22, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_IS_CHAN_A_FAST_CLOCK
Lloh4:
	adrp	x8, _AR_PHY_MODE_DYN_CCK_DISABLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AR_PHY_MODE_DYN_CCK_DISABLE@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh6:
	ldr	w8, [x8]
	orr	w8, w8, w9
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w21, w8, w22
	mov	x0, x20
	bl	_IS_CHAN_HALF_RATE
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_IS_CHAN_QUARTER_RATE
	cbz	x0, LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _AR_PHY_FRAME_CTL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AR_PHY_FRAME_CTL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #3
	bl	_REG_RMW_FIELD
LBB0_4:
Lloh13:
	adrp	x8, _AR_PHY_MODE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AR_PHY_MODE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	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_5:
	.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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.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_DYN_CCK_DISABLE,4,2 ; @AR_PHY_MODE_DYN_CCK_DISABLE
	.comm	_AR_PHY_FRAME_CTL,4,2           ; @AR_PHY_FRAME_CTL
	.comm	_AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW,4,2 ; @AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW
	.comm	_AR_PHY_MODE,4,2                ; @AR_PHY_MODE
	.no_dead_strip	_ar9003_hw_set_rfmode
.subsections_via_symbols
