	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtw_set_channel                ## -- Begin function rtw_set_channel
	.p2align	4, 0x90
_rtw_set_channel:                       ## @rtw_set_channel
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	(%rdi), %r15
	movq	32(%rdi), %rdi
	leaq	-56(%rbp), %rsi
	callq	_rtw_get_channel_params
	xorl	%edi, %edi
	cmpq	$0, -56(%rbp)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	testq	%rax, %rax
	jne	LBB0_13
## %bb.1:
	movl	-56(%rbp), %r14d
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movl	%edx, 8(%r12)
	movl	%r14d, 12(%r12)
	cmpl	$15, %r14d
	jl	LBB0_2
## %bb.3:
	movq	_RTW_BAND_5G@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_RTW_BAND_2G@GOTPCREL(%rip), %rax
LBB0_4:
	movq	(%rax), %rax
	movq	%rax, 16(%r12)
	movq	_RTW_CHANNEL_WIDTH_20@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	_RTW_MAX_CHANNEL_WIDTH@GOTPCREL(%rip), %r8
	cmpl	(%r8), %eax
	jg	LBB0_7
## %bb.5:
	movq	-40(%rbp), %rdi
	movq	24(%r12), %rbx
	decq	%rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rdi,%rax,4), %esi
	movl	%esi, 4(%rbx,%rax,4)
	movslq	(%r8), %rsi
	incq	%rax
	cmpq	%rsi, %rax
	jl	LBB0_6
LBB0_7:
	movq	(%r15), %rax
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	*(%rax)
	movq	16(%r12), %rax
	movq	_RTW_BAND_5G@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	_COEX_SWITCH_TO_5G@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	movq	_RTW_FLAG_SCANNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rtw_flag_check
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:
	movq	_COEX_SWITCH_TO_24G_NOFORSCAN@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_COEX_SWITCH_TO_24G@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rtw_coex_switchband_notify
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_rtw_phy_set_tx_power_level
LBB0_13:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid channel\n"

	.comm	_RTW_BAND_5G,8,3                ## @RTW_BAND_5G
	.comm	_RTW_BAND_2G,8,3                ## @RTW_BAND_2G
	.comm	_RTW_CHANNEL_WIDTH_20,4,2       ## @RTW_CHANNEL_WIDTH_20
	.comm	_RTW_MAX_CHANNEL_WIDTH,4,2      ## @RTW_MAX_CHANNEL_WIDTH
	.comm	_COEX_SWITCH_TO_5G,4,2          ## @COEX_SWITCH_TO_5G
	.comm	_RTW_FLAG_SCANNING,4,2          ## @RTW_FLAG_SCANNING
	.comm	_COEX_SWITCH_TO_24G,4,2         ## @COEX_SWITCH_TO_24G
	.comm	_COEX_SWITCH_TO_24G_NOFORSCAN,4,2 ## @COEX_SWITCH_TO_24G_NOFORSCAN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtw_set_channel                ; -- Begin function rtw_set_channel
	.p2align	2
_rtw_set_channel:                       ; @rtw_set_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x0, [x0, #32]
	ldr	x21, [x19]
	add	x1, sp, #8
	bl	_rtw_get_channel_params
	ldr	x8, [sp, #8]
	cmp	x8, #0
	cset	w0, eq
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	w20, [sp, #8]
	ldp	w2, w3, [sp, #16]
Lloh2:
	adrp	x22, _RTW_BAND_5G@GOTPAGE
Lloh3:
	ldr	x22, [x22, _RTW_BAND_5G@GOTPAGEOFF]
Lloh4:
	adrp	x8, _RTW_BAND_2G@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RTW_BAND_2G@GOTPAGEOFF]
	stp	w2, w20, [x19, #8]
	cmp	w20, #14
	csel	x8, x22, x8, gt
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _RTW_CHANNEL_WIDTH_20@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RTW_CHANNEL_WIDTH_20@GOTPAGEOFF]
	str	x8, [x19, #16]
Lloh8:
	ldrsw	x8, [x9]
Lloh9:
	adrp	x9, _RTW_MAX_CHANNEL_WIDTH@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RTW_MAX_CHANNEL_WIDTH@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w8, w10
	b.gt	LBB0_4
; %bb.2:
	ldr	x10, [sp, #24]
	ldr	x11, [x19, #24]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x12, x8, #2
	ldr	w13, [x10, x12]
	str	w13, [x11, x12]
	add	x12, x8, #1
	ldrsw	x13, [x9]
	cmp	x8, x13
	mov	x8, x12
	b.lt	LBB0_3
LBB0_4:
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	ldr	x8, [x19, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh11:
	adrp	x8, _COEX_SWITCH_TO_5G@GOTPAGE
Lloh12:
	ldr	x8, [x8, _COEX_SWITCH_TO_5G@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _RTW_FLAG_SCANNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RTW_FLAG_SCANNING@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtw_flag_check
Lloh16:
	adrp	x8, _COEX_SWITCH_TO_24G@GOTPAGE
Lloh17:
	ldr	x8, [x8, _COEX_SWITCH_TO_24G@GOTPAGEOFF]
Lloh18:
	adrp	x9, _COEX_SWITCH_TO_24G_NOFORSCAN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _COEX_SWITCH_TO_24G_NOFORSCAN@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
LBB0_7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtw_coex_switchband_notify
	mov	x0, x19
	mov	x1, x20
	bl	_rtw_phy_set_tx_power_level
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid channel\n"

	.comm	_RTW_BAND_5G,8,3                ; @RTW_BAND_5G
	.comm	_RTW_BAND_2G,8,3                ; @RTW_BAND_2G
	.comm	_RTW_CHANNEL_WIDTH_20,4,2       ; @RTW_CHANNEL_WIDTH_20
	.comm	_RTW_MAX_CHANNEL_WIDTH,4,2      ; @RTW_MAX_CHANNEL_WIDTH
	.comm	_COEX_SWITCH_TO_5G,4,2          ; @COEX_SWITCH_TO_5G
	.comm	_RTW_FLAG_SCANNING,4,2          ; @RTW_FLAG_SCANNING
	.comm	_COEX_SWITCH_TO_24G,4,2         ; @COEX_SWITCH_TO_24G
	.comm	_COEX_SWITCH_TO_24G_NOFORSCAN,4,2 ; @COEX_SWITCH_TO_24G_NOFORSCAN
.subsections_via_symbols
