	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_fast_chan_change
_ar9003_hw_fast_chan_change:            ## @ar9003_hw_fast_chan_change
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_IS_CHAN_5GHZ
	movq	%rax, %r13
	movq	%r14, %rdi
	callq	_IS_CHAN_HT40
	xorl	%ebx, %ebx
	testq	%rax, %rax
	sete	%bl
	movl	$2, %eax
	subl	%ebx, %eax
	addl	$3, %ebx
	testq	%r13, %r13
	cmovnel	%eax, %ebx
	movq	%r12, %rdi
	callq	_AR_SREV_9531
	testq	%rax, %rax
	movl	$1, %r13d
	cmovel	%ebx, %r13d
	xorl	%eax, %eax
	cmpl	(%r12), %ebx
	je	LBB0_13
## %bb.1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_ATH_INI_POST@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	shlq	$2, %rsi
	addq	56(%r12), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ar9003_hw_prog_ini
	movq	(%r15), %rsi
	shlq	$2, %rsi
	addq	48(%r12), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ar9003_hw_prog_ini
	movq	(%r15), %rsi
	shlq	$2, %rsi
	addq	40(%r12), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ar9003_hw_prog_ini
	movq	(%r15), %rsi
	shlq	$2, %rsi
	addq	32(%r12), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ar9003_hw_prog_ini
	movq	%r12, %rdi
	callq	_AR_SREV_9462_20_OR_LATER
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	24(%r12), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ar9003_hw_prog_ini
LBB0_3:
	leaq	20(%r12), %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE_ARRAY
	movq	%r12, %rdi
	callq	_AR_SREV_9462_20_OR_LATER
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r12, %rdi
	callq	_ar9003_hw_get_rx_gain_idx
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.5:
	leaq	16(%r12), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE_ARRAY
	leaq	12(%r12), %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE_ARRAY
LBB0_6:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_IS_CHAN_A_FAST_CLOCK
	testq	%rax, %rax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	leaq	8(%r12), %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE_ARRAY
LBB0_8:
	movq	%r12, %rdi
	callq	_AR_SREV_9565
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	8(%r12), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE_ARRAY
LBB0_10:
	cmpl	$2484, (%r14)                   ## imm = 0x9B4
	jne	LBB0_12
## %bb.11:
	leaq	4(%r12), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_ar9003_hw_prog_ini
LBB0_12:
	movl	%ebx, (%r12)
	movl	$1, %eax
LBB0_13:
	movl	%eax, (%r15)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ar9003_hw_set_rfmode
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH_INI_POST,8,3               ## @ATH_INI_POST
	.no_dead_strip	_ar9003_hw_fast_chan_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_fast_chan_change
_ar9003_hw_fast_chan_change:            ; @ar9003_hw_fast_chan_change
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_IS_CHAN_5GHZ
	mov	x22, x0
	mov	x0, x19
	bl	_IS_CHAN_HT40
	cmp	x0, #0
	mov	w8, #1
	cinc	w8, w8, ne
	mov	w9, #3
	cinc	w9, w9, eq
	cmp	x22, #0
	csel	w22, w9, w8, eq
	mov	x0, x20
	bl	_AR_SREV_9531
	cmp	x0, #0
	csinc	w23, w22, wzr, eq
	ldr	w8, [x20]
	cmp	w22, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #0
	b	LBB0_14
LBB0_2:
	ldr	x8, [x20, #56]
Lloh0:
	adrp	x24, _ATH_INI_POST@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ATH_INI_POST@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	mov	x2, x22
	bl	_ar9003_hw_prog_ini
	ldr	x8, [x20, #48]
	ldr	x9, [x24]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	mov	x2, x22
	bl	_ar9003_hw_prog_ini
	ldr	x8, [x20, #40]
	ldr	x9, [x24]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	mov	x2, x22
	bl	_ar9003_hw_prog_ini
	ldr	x8, [x20, #32]
	ldr	x9, [x24]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	mov	x2, x22
	bl	_ar9003_hw_prog_ini
	mov	x0, x20
	bl	_AR_SREV_9462_20_OR_LATER
	cbz	x0, LBB0_4
; %bb.3:
	add	x1, x20, #24
	mov	x0, x20
	mov	x2, x22
	bl	_ar9003_hw_prog_ini
LBB0_4:
	add	x0, x20, #20
	mov	x1, x23
	mov	w2, #0
	bl	_REG_WRITE_ARRAY
	mov	x0, x20
	bl	_AR_SREV_9462_20_OR_LATER
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_ar9003_hw_get_rx_gain_idx
	cmp	w0, #2
	b.ne	LBB0_7
; %bb.6:
	add	x0, x20, #16
	mov	w1, #1
	mov	w2, #0
	bl	_REG_WRITE_ARRAY
	add	x0, x20, #12
	mov	x1, x22
	mov	w2, #0
	bl	_REG_WRITE_ARRAY
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	bl	_IS_CHAN_A_FAST_CLOCK
	cbz	x0, LBB0_9
; %bb.8:
	add	x0, x20, #8
	mov	x1, x22
	mov	w2, #0
	bl	_REG_WRITE_ARRAY
LBB0_9:
	mov	x0, x20
	bl	_AR_SREV_9565
	cbz	x0, LBB0_11
; %bb.10:
	add	x0, x20, #8
	mov	w1, #1
	mov	w2, #0
	bl	_REG_WRITE_ARRAY
LBB0_11:
	ldr	w8, [x19]
	cmp	w8, #2484
	b.ne	LBB0_13
; %bb.12:
	add	x1, x20, #4
	mov	x0, x20
	mov	w2, #1
	bl	_ar9003_hw_prog_ini
LBB0_13:
	str	w22, [x20]
	mov	w8, #1
LBB0_14:
	str	w8, [x21]
	mov	x0, x20
	mov	x1, x19
	bl	_ar9003_hw_set_rfmode
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH_INI_POST,8,3               ; @ATH_INI_POST
	.no_dead_strip	_ar9003_hw_fast_chan_change
.subsections_via_symbols
