	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92d_phy_sw_chnl             ## -- Begin function rtl92d_phy_sw_chnl
	.p2align	4, 0x90
_rtl92d_phy_sw_chnl:                    ## @rtl92d_phy_sw_chnl
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_rtl_priv
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	xorl	%r12d, %r12d
	cmpl	$0, 12(%r15)
	jne	LBB0_31
## %bb.1:
	cmpq	$0, 40(%r15)
	jne	LBB0_31
## %bb.2:
	movq	%r15, %rbx
	movl	8(%r15), %r14d
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_is_hal_stop
	testq	%rax, %rax
	jne	LBB0_32
## %bb.3:
	movq	%r13, %rdi
	callq	_RT_CANNOT_IO
	testq	%rax, %rax
	je	LBB0_4
LBB0_32:
	movq	_COMP_CHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
LBB0_31:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	cmpq	$0, 32(%rbx)
	je	LBB0_8
## %bb.5:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$50, %edi
	callq	_mdelay
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 32(%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	50(%r14), %rax
	cmpq	$950, %r14                      ## imm = 0x3B6
	movq	%rax, %r14
	jb	LBB0_6
LBB0_8:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movq	_SINGLEMAC_SINGLEPHY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_16
## %bb.9:
	movq	8(%rdx), %rax
	movq	_BAND_ON_BOTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.10:
	movq	_RFPGA0_XAB_RFPARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASKDWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_rtl_get_bbreg
	movq	%rax, %rbx
	cmpl	$15, 8(%r14)
	jl	LBB0_14
## %bb.11:
	xorl	%edi, %edi
	callq	_BIT
	testq	%rbx, %rax
	je	LBB0_12
## %bb.13:
	cmpl	$14, 8(%r14)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jg	LBB0_16
LBB0_14:
	xorl	%edi, %edi
	callq	_BIT
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	$129, %esi
	testq	%rbx, %rax
	jne	LBB0_15
	jmp	LBB0_16
LBB0_12:
	movl	$128, %esi
LBB0_15:
	movq	%r13, %rdi
	callq	_rtl92d_phy_switch_wirelessband
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_16:
	movl	16(%rdx), %eax
	cmpl	$129, %eax
	je	LBB0_21
## %bb.17:
	cmpl	$128, %eax
	jne	LBB0_23
## %bb.18:
	cmpl	$15, -44(%rbp)                  ## 4-byte Folded Reload
	jl	LBB0_31
## %bb.19:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_20
LBB0_21:
	cmpl	$14, -44(%rbp)                  ## 4-byte Folded Reload
	jg	LBB0_31
## %bb.22:
	leaq	L_.str.2(%rip), %rsi
LBB0_20:
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_WARN_ONCE
	jmp	LBB0_24
LBB0_23:
	movl	(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_WARN_ONCE
LBB0_24:
	movl	$1, 12(%r14)
	leaq	24(%r15), %r12
	addq	$16, %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	movq	_COMP_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r14), %r8d
	leaq	L_.str.4(%rip), %rcx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	leaq	-72(%rbp), %rbx
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 12(%r14)
	je	LBB0_30
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	movl	8(%r14), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	movq	%r15, %rcx
	movq	%rbx, %r8
	callq	__rtl92d_phy_sw_chnl_step_by_step
	testl	%eax, %eax
	jne	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	-72(%rbp), %rdi
	testq	%rdi, %rdi
	jle	LBB0_25
## %bb.28:
	callq	_mdelay
	jmp	LBB0_30
LBB0_29:
	movl	$0, 12(%r14)
LBB0_30:
	movq	_COMP_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %rcx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movl	$0, 12(%r14)
	movl	$1, %r12d
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_COMP_CHAN,4,2                  ## @COMP_CHAN
	.comm	_DBG_LOUD,4,2                   ## @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sw_chnl_inprogress false driver sleep or unload\n"

	.comm	_SINGLEMAC_SINGLEPHY,8,3        ## @SINGLEMAC_SINGLEPHY
	.comm	_BAND_ON_BOTH,8,3               ## @BAND_ON_BOTH
	.comm	_RFPGA0_XAB_RFPARAMETER,4,2     ## @RFPGA0_XAB_RFPARAMETER
	.comm	_MASKDWORD,4,2                  ## @MASKDWORD
L_.str.1:                               ## @.str.1
	.asciz	"rtl8192de: 5G but channel<=14\n"

L_.str.2:                               ## @.str.2
	.asciz	"rtl8192de: 2G but channel>14\n"

L_.str.3:                               ## @.str.3
	.asciz	"rtl8192de: Invalid WirelessMode(%#x)!!\n"

	.comm	_COMP_SCAN,4,2                  ## @COMP_SCAN
	.comm	_DBG_TRACE,4,2                  ## @DBG_TRACE
L_.str.4:                               ## @.str.4
	.asciz	"switch to channel%d\n"

L_.str.5:                               ## @.str.5
	.asciz	"<==\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92d_phy_sw_chnl             ; -- Begin function rtl92d_phy_sw_chnl
	.p2align	2
_rtl92d_phy_sw_chnl:                    ; @rtl92d_phy_sw_chnl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_hal
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_5
; %bb.1:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	w23, [x19, #8]
	bl	_is_hal_stop
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_RT_CANNOT_IO
	cbz	x0, LBB0_7
LBB0_4:
Lloh0:
	adrp	x8, _COMP_CHAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMP_CHAN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_11
; %bb.8:
	mov	x22, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #50
	bl	_mdelay
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x22, #50
	cmp	x22, #950
	mov	x22, x8
	b.lo	LBB0_9
LBB0_11:
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _SINGLEMAC_SINGLEPHY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SINGLEMAC_SINGLEPHY@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.12:
	ldr	x8, [x21, #8]
Lloh11:
	adrp	x9, _BAND_ON_BOTH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BAND_ON_BOTH@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.13:
Lloh14:
	adrp	x8, _RFPGA0_XAB_RFPARAMETER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RFPGA0_XAB_RFPARAMETER@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _MASKDWORD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MASKDWORD@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_rtl_get_bbreg
	mov	x22, x0
	ldr	w8, [x19, #8]
	cmp	w8, #15
	b.lt	LBB0_16
; %bb.14:
	mov	w0, #0
	bl	_BIT
	tst	x0, x22
	b.eq	LBB0_18
; %bb.15:
	ldr	w8, [x19, #8]
	cmp	w8, #14
	b.gt	LBB0_20
LBB0_16:
	mov	w0, #0
	bl	_BIT
	tst	x0, x22
	b.eq	LBB0_20
; %bb.17:
	mov	w1, #129
	b	LBB0_19
LBB0_18:
	mov	w1, #128
LBB0_19:
	mov	x0, x20
	bl	_rtl92d_phy_switch_wirelessband
LBB0_20:
	ldr	w8, [x21, #16]
	cmp	w8, #129
	b.eq	LBB0_24
; %bb.21:
	cmp	w8, #128
	b.ne	LBB0_27
; %bb.22:
	cmp	w23, #15
	b.lt	LBB0_5
; %bb.23:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_26
LBB0_24:
	cmp	w23, #14
	b.gt	LBB0_5
; %bb.25:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_26:
	mov	w0, #0
	b	LBB0_28
LBB0_27:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
LBB0_28:
	bl	_WARN_ONCE
	mov	x21, x19
	str	xzr, [x21, #24]!
	mov	w8, #1
	mov	x22, x19
	str	xzr, [x22, #16]!
Lloh26:
	adrp	x23, _COMP_SCAN@GOTPAGE
Lloh27:
	ldr	x23, [x23, _COMP_SCAN@GOTPAGEOFF]
	str	w8, [x19, #12]
	ldr	w1, [x23]
Lloh28:
	adrp	x24, _DBG_TRACE@GOTPAGE
Lloh29:
	ldr	x24, [x24, _DBG_TRACE@GOTPAGEOFF]
	ldr	w2, [x24]
	ldr	w8, [x19, #8]
	str	x8, [sp]
Lloh30:
	adrp	x3, l_.str.4@PAGE
Lloh31:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_34
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	w1, [x19, #8]
	add	x4, sp, #8
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	bl	__rtl92d_phy_sw_chnl_step_by_step
	cbnz	w0, LBB0_33
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	x0, [sp, #8]
	cmp	x0, #1
	b.lt	LBB0_29
; %bb.32:
	bl	_mdelay
	b	LBB0_34
LBB0_33:
	str	wzr, [x19, #12]
LBB0_34:
	ldr	w1, [x23]
	ldr	w2, [x24]
Lloh32:
	adrp	x3, l_.str.5@PAGE
Lloh33:
	add	x3, x3, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	str	wzr, [x19, #12]
	mov	w0, #1
	b	LBB0_6
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_COMP_CHAN,4,2                  ; @COMP_CHAN
	.comm	_DBG_LOUD,4,2                   ; @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sw_chnl_inprogress false driver sleep or unload\n"

	.comm	_SINGLEMAC_SINGLEPHY,8,3        ; @SINGLEMAC_SINGLEPHY
	.comm	_BAND_ON_BOTH,8,3               ; @BAND_ON_BOTH
	.comm	_RFPGA0_XAB_RFPARAMETER,4,2     ; @RFPGA0_XAB_RFPARAMETER
	.comm	_MASKDWORD,4,2                  ; @MASKDWORD
l_.str.1:                               ; @.str.1
	.asciz	"rtl8192de: 5G but channel<=14\n"

l_.str.2:                               ; @.str.2
	.asciz	"rtl8192de: 2G but channel>14\n"

l_.str.3:                               ; @.str.3
	.asciz	"rtl8192de: Invalid WirelessMode(%#x)!!\n"

	.comm	_COMP_SCAN,4,2                  ; @COMP_SCAN
	.comm	_DBG_TRACE,4,2                  ; @DBG_TRACE
l_.str.4:                               ; @.str.4
	.asciz	"switch to channel%d\n"

l_.str.5:                               ; @.str.5
	.asciz	"<==\n"

.subsections_via_symbols
