	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtw_set_channel_mac            ## -- Begin function rtw_set_channel_mac
	.p2align	4, 0x90
_rtw_set_channel_mac:                   ## @rtw_set_channel_mac
	.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
	movl	%edx, %r15d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movl	%ecx, %eax
	andl	$-3, %eax
	xorl	%edx, %edx
	cmpl	$1, %eax
	sete	%dl
	movl	$10, %ebx
	subl	%edx, %ebx
	movq	_REG_DATA_SC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%ecx, %edi
	callq	_BIT_TXSC_20M
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_BIT_TXSC_40M
	orl	%eax, %r14d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_rtw_write8
	movq	_REG_WMAC_TRXPTCL_CTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtw_read32
	movq	_BIT_RFMOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	cmpl	$129, %r15d
	je	LBB0_3
## %bb.1:
	cmpl	$128, %r15d
	jne	LBB0_5
## %bb.2:
	movq	_BIT_RFMOD_80M@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_BIT_RFMOD_40M@GOTPCREL(%rip), %rax
LBB0_4:
	orl	(%rax), %edx
LBB0_5:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtw_write32
	movq	_REG_AFE_CTRL1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtw_read32
	movq	_BIT_MAC_CLK_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_BIT_SHIFT_MAC_CLK_SEL@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_MAC_CLK_HW_DEF_80M@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	shll	%cl, %edx
	notl	%esi
	andl	%eax, %esi
	orl	%esi, %edx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtw_write32
	movq	_REG_USTIME_TSF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAC_CLK_SPEED@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	callq	_rtw_write8
	movq	_REG_USTIME_EDCA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r12, %rdi
	callq	_rtw_write8
	movq	_REG_CCK_CHECK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtw_read8
	movq	_BIT_CHECK_CCK_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %edx
	cmpl	$36, -44(%rbp)                  ## 4-byte Folded Reload
	cmovll	%ecx, %edx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtw_write8                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_DATA_SC,4,2                ## @REG_DATA_SC
	.comm	_REG_WMAC_TRXPTCL_CTL,4,2       ## @REG_WMAC_TRXPTCL_CTL
	.comm	_BIT_RFMOD,4,2                  ## @BIT_RFMOD
	.comm	_BIT_RFMOD_80M,4,2              ## @BIT_RFMOD_80M
	.comm	_BIT_RFMOD_40M,4,2              ## @BIT_RFMOD_40M
	.comm	_REG_AFE_CTRL1,4,2              ## @REG_AFE_CTRL1
	.comm	_BIT_MAC_CLK_SEL,4,2            ## @BIT_MAC_CLK_SEL
	.comm	_MAC_CLK_HW_DEF_80M,4,2         ## @MAC_CLK_HW_DEF_80M
	.comm	_BIT_SHIFT_MAC_CLK_SEL,4,2      ## @BIT_SHIFT_MAC_CLK_SEL
	.comm	_REG_USTIME_TSF,4,2             ## @REG_USTIME_TSF
	.comm	_MAC_CLK_SPEED,4,2              ## @MAC_CLK_SPEED
	.comm	_REG_USTIME_EDCA,4,2            ## @REG_USTIME_EDCA
	.comm	_REG_CCK_CHECK,4,2              ## @REG_CCK_CHECK
	.comm	_BIT_CHECK_CCK_EN,4,2           ## @BIT_CHECK_CCK_EN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtw_set_channel_mac            ; -- Begin function rtw_set_channel_mac
	.p2align	2
_rtw_set_channel_mac:                   ; @rtw_set_channel_mac
	.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	x20, x1
	mov	x19, x0
	and	w8, w3, #0xfffffffd
	cmp	w8, #1
	mov	w8, #9
	cinc	w22, w8, ne
Lloh0:
	adrp	x8, _REG_DATA_SC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_DATA_SC@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x3
	bl	_BIT_TXSC_20M
	mov	x24, x0
	mov	x0, x22
	bl	_BIT_TXSC_40M
	orr	w2, w0, w24
	mov	x0, x19
	mov	x1, x23
	bl	_rtw_write8
Lloh3:
	adrp	x22, _REG_WMAC_TRXPTCL_CTL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _REG_WMAC_TRXPTCL_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtw_read32
Lloh5:
	adrp	x8, _BIT_RFMOD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BIT_RFMOD@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w2, w0, w8
	cmp	w21, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_5
; %bb.2:
Lloh8:
	adrp	x8, _BIT_RFMOD_80M@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BIT_RFMOD_80M@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _BIT_RFMOD_40M@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BIT_RFMOD_40M@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	orr	w2, w8, w2
LBB0_5:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtw_write32
Lloh12:
	adrp	x21, _REG_AFE_CTRL1@GOTPAGE
Lloh13:
	ldr	x21, [x21, _REG_AFE_CTRL1@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtw_read32
Lloh14:
	adrp	x8, _BIT_MAC_CLK_SEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BIT_MAC_CLK_SEL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh17:
	adrp	x9, _MAC_CLK_HW_DEF_80M@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MAC_CLK_HW_DEF_80M@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _BIT_SHIFT_MAC_CLK_SEL@GOTPAGE
Lloh21:
	ldr	x10, [x10, _BIT_SHIFT_MAC_CLK_SEL@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w2, w9, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtw_write32
Lloh23:
	adrp	x8, _REG_USTIME_TSF@GOTPAGE
Lloh24:
	ldr	x8, [x8, _REG_USTIME_TSF@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x21, _MAC_CLK_SPEED@GOTPAGE
Lloh27:
	ldr	x21, [x21, _MAC_CLK_SPEED@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_rtw_write8
Lloh28:
	adrp	x8, _REG_USTIME_EDCA@GOTPAGE
Lloh29:
	ldr	x8, [x8, _REG_USTIME_EDCA@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_rtw_write8
Lloh31:
	adrp	x21, _REG_CCK_CHECK@GOTPAGE
Lloh32:
	ldr	x21, [x21, _REG_CCK_CHECK@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtw_read8
Lloh33:
	adrp	x8, _BIT_CHECK_CCK_EN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _BIT_CHECK_CCK_EN@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	bic	w9, w0, w8
	orr	w8, w8, w0
	cmp	w20, #35
	csel	w2, w8, w9, gt
	ldr	w1, [x21]
	mov	x0, x19
	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
	b	_rtw_write8
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_DATA_SC,4,2                ; @REG_DATA_SC
	.comm	_REG_WMAC_TRXPTCL_CTL,4,2       ; @REG_WMAC_TRXPTCL_CTL
	.comm	_BIT_RFMOD,4,2                  ; @BIT_RFMOD
	.comm	_BIT_RFMOD_80M,4,2              ; @BIT_RFMOD_80M
	.comm	_BIT_RFMOD_40M,4,2              ; @BIT_RFMOD_40M
	.comm	_REG_AFE_CTRL1,4,2              ; @REG_AFE_CTRL1
	.comm	_BIT_MAC_CLK_SEL,4,2            ; @BIT_MAC_CLK_SEL
	.comm	_MAC_CLK_HW_DEF_80M,4,2         ; @MAC_CLK_HW_DEF_80M
	.comm	_BIT_SHIFT_MAC_CLK_SEL,4,2      ; @BIT_SHIFT_MAC_CLK_SEL
	.comm	_REG_USTIME_TSF,4,2             ; @REG_USTIME_TSF
	.comm	_MAC_CLK_SPEED,4,2              ; @MAC_CLK_SPEED
	.comm	_REG_USTIME_EDCA,4,2            ; @REG_USTIME_EDCA
	.comm	_REG_CCK_CHECK,4,2              ; @REG_CCK_CHECK
	.comm	_BIT_CHECK_CCK_EN,4,2           ; @BIT_CHECK_CCK_EN
.subsections_via_symbols
