	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8723be_phy_set_bw_mode_callback ## -- Begin function rtl8723be_phy_set_bw_mode_callback
	.p2align	4, 0x90
_rtl8723be_phy_set_bw_mode_callback:    ## @rtl8723be_phy_set_bw_mode_callback
	.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	%rdi, %r14
	callq	_rtl_priv
	movq	%rax, %r13
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_mac
	movq	%rax, %r15
	movq	_COMP_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	$129, (%r13)
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str(%rip), %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	%rbx, %rdi
	callq	_is_hal_stop
	testq	%rax, %rax
	je	LBB0_1
## %bb.13:
	movl	$0, 4(%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_REG_BWOPMODE@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%r13, %rdi
	callq	_rtl_read_byte
	movl	%eax, %r12d
	movq	_REG_RRSR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$2, %rsi
	movq	%r13, %rdi
	callq	_rtl_read_byte
	movl	(%r13), %esi
	cmpl	$128, %esi
	je	LBB0_5
## %bb.2:
	cmpl	$129, %esi
	jne	LBB0_6
## %bb.3:
	movq	_BW_OPMODE_20MHZ@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	(%r15), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_rtl_write_byte
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %ebx
	movq	_BW_OPMODE_20MHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
	movq	(%r15), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_rtl_write_byte
	andl	$144, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	shll	$5, %edx
	orl	%ebx, %edx
	movq	_REG_RRSR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$2, %rsi
	movq	%r13, %rdi
	callq	_rtl_write_byte
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
LBB0_7:
	movq	_COMP_SCAN@GOTPCREL(%rip), %r15
	movl	(%r13), %esi
	cmpl	$128, %esi
	je	LBB0_10
## %bb.8:
	cmpl	$129, %esi
	jne	LBB0_11
## %bb.9:
	movq	_RFPGA0_RFMOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BRFMOD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_rtl_set_bbreg
	movq	_RFPGA1_RFMOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_rtl_set_bbreg
	jmp	LBB0_12
LBB0_10:
	movq	_RFPGA0_RFMOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BRFMOD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movq	_RFPGA1_RFMOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movq	_RCCK0_SYSTEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BCCK_SIDEBAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %ecx
	sarl	%ecx
	movq	%r14, %rdi
	callq	_rtl_set_bbreg
	movq	_ROFDM1_LSTF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movl	$3072, %edx                     ## imm = 0xC00
	callq	_rtl_set_bbreg
	movl	$26, %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	$27, %edi
	callq	_BIT
	orl	%eax, %ebx
	movl	(%r12), %eax
	movq	_HAL_PRIME_CHNL_OFFSET_LOWER@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpl	(%rdx), %eax
	sete	%cl
	incl	%ecx
	movq	%r14, %rdi
	movl	$2072, %esi                     ## imm = 0x818
	movl	%ebx, %edx
	callq	_rtl_set_bbreg
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
LBB0_12:
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_rtl8723be_phy_rf6052_set_bandwidth
	movl	$0, 4(%r13)
	movl	(%r15), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RT_TRACE                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_COMP_SCAN,4,2                  ## @COMP_SCAN
	.comm	_DBG_TRACE,4,2                  ## @DBG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Switch to %s bandwidth\n"

L_.str.1:                               ## @.str.1
	.asciz	"20MHz"

L_.str.2:                               ## @.str.2
	.asciz	"40MHz"

	.comm	_REG_BWOPMODE,8,3               ## @REG_BWOPMODE
	.comm	_REG_RRSR,8,3                   ## @REG_RRSR
	.comm	_BW_OPMODE_20MHZ,4,2            ## @BW_OPMODE_20MHZ
L_.str.3:                               ## @.str.3
	.asciz	"unknown bandwidth: %#X\n"

	.comm	_RFPGA0_RFMOD,4,2               ## @RFPGA0_RFMOD
	.comm	_BRFMOD,4,2                     ## @BRFMOD
	.comm	_RFPGA1_RFMOD,4,2               ## @RFPGA1_RFMOD
	.comm	_RCCK0_SYSTEM,4,2               ## @RCCK0_SYSTEM
	.comm	_BCCK_SIDEBAND,4,2              ## @BCCK_SIDEBAND
	.comm	_ROFDM1_LSTF,4,2                ## @ROFDM1_LSTF
	.comm	_HAL_PRIME_CHNL_OFFSET_LOWER,4,2 ## @HAL_PRIME_CHNL_OFFSET_LOWER
	.comm	_DBG_LOUD,4,2                   ## @DBG_LOUD
L_.str.4:                               ## @.str.4
	.asciz	"\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8723be_phy_set_bw_mode_callback ; -- Begin function rtl8723be_phy_set_bw_mode_callback
	.p2align	2
_rtl8723be_phy_set_bw_mode_callback:    ; @rtl8723be_phy_set_bw_mode_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_hal
	mov	x22, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_mac
	mov	x21, x0
Lloh0:
	adrp	x24, _COMP_SCAN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _COMP_SCAN@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh2:
	adrp	x8, _DBG_TRACE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DBG_TRACE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	ldr	w8, [x19]
Lloh5:
	adrp	x9, l_.str.2@PAGE
Lloh6:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh7:
	adrp	x10, l_.str.1@PAGE
Lloh8:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w8, #129
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	mov	x0, x22
	bl	_is_hal_stop
	cbz	x0, LBB0_2
; %bb.1:
	str	wzr, [x19, #4]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_2:
Lloh11:
	adrp	x25, _REG_BWOPMODE@GOTPAGE
Lloh12:
	ldr	x25, [x25, _REG_BWOPMODE@GOTPAGEOFF]
	ldr	x1, [x25]
	mov	x0, x19
	bl	_rtl_read_byte
	mov	x22, x0
Lloh13:
	adrp	x26, _REG_RRSR@GOTPAGE
Lloh14:
	ldr	x26, [x26, _REG_RRSR@GOTPAGEOFF]
	ldr	x8, [x26]
	add	x1, x8, #2
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	w1, [x19]
	cmp	w1, #128
	b.eq	LBB0_5
; %bb.3:
	cmp	w1, #129
	b.ne	LBB0_7
; %bb.4:
Lloh15:
	adrp	x8, _BW_OPMODE_20MHZ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BW_OPMODE_20MHZ@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w2, w8, w22
	ldr	x1, [x25]
	b	LBB0_6
LBB0_5:
	mov	x23, x0
Lloh18:
	adrp	x8, _BW_OPMODE_20MHZ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BW_OPMODE_20MHZ@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	bic	w2, w22, w8
	ldr	x1, [x25]
	mov	x0, x19
	bl	_rtl_write_byte
	mov	w8, #144
	and	w8, w23, w8
	ldr	w9, [x21]
	orr	w2, w8, w9, lsl #5
	ldr	x8, [x26]
	add	x1, x8, #2
LBB0_6:
	mov	x0, x19
	bl	_rtl_write_byte
	b	LBB0_8
LBB0_7:
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
LBB0_8:
	ldr	w1, [x19]
	cmp	w1, #128
	b.eq	LBB0_11
; %bb.9:
	cmp	w1, #129
	b.ne	LBB0_12
; %bb.10:
Lloh23:
	adrp	x8, _RFPGA0_RFMOD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RFPGA0_RFMOD@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x21, _BRFMOD@GOTPAGE
Lloh27:
	ldr	x21, [x21, _BRFMOD@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x20
	mov	w3, #0
	bl	_rtl_set_bbreg
Lloh28:
	adrp	x8, _RFPGA1_RFMOD@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RFPGA1_RFMOD@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x20
	mov	w3, #0
	bl	_rtl_set_bbreg
	b	LBB0_13
LBB0_11:
Lloh31:
	adrp	x8, _RFPGA0_RFMOD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RFPGA0_RFMOD@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x22, _BRFMOD@GOTPAGE
Lloh35:
	ldr	x22, [x22, _BRFMOD@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w23, #1
	mov	x0, x20
	mov	w3, #1
	bl	_rtl_set_bbreg
Lloh36:
	adrp	x8, _RFPGA1_RFMOD@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RFPGA1_RFMOD@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w3, #1
	bl	_rtl_set_bbreg
Lloh39:
	adrp	x8, _RCCK0_SYSTEM@GOTPAGE
Lloh40:
	ldr	x8, [x8, _RCCK0_SYSTEM@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x8, _BCCK_SIDEBAND@GOTPAGE
Lloh43:
	ldr	x8, [x8, _BCCK_SIDEBAND@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	ldr	w8, [x21]
	asr	w3, w8, #1
	mov	x0, x20
	bl	_rtl_set_bbreg
Lloh45:
	adrp	x8, _ROFDM1_LSTF@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ROFDM1_LSTF@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	ldr	w3, [x21]
	mov	x0, x20
	mov	w2, #3072
	bl	_rtl_set_bbreg
	mov	w0, #26
	bl	_BIT
	mov	x22, x0
	mov	w0, #27
	bl	_BIT
	orr	w2, w0, w22
	ldr	w8, [x21]
Lloh48:
	adrp	x9, _HAL_PRIME_CHNL_OFFSET_LOWER@GOTPAGE
Lloh49:
	ldr	x9, [x9, _HAL_PRIME_CHNL_OFFSET_LOWER@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	cmp	w8, w9
	cinc	w3, w23, eq
	mov	x0, x20
	mov	w1, #2072
	bl	_rtl_set_bbreg
	b	LBB0_13
LBB0_12:
Lloh51:
	adrp	x0, l_.str.3@PAGE
Lloh52:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
LBB0_13:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_rtl8723be_phy_rf6052_set_bandwidth
	str	wzr, [x19, #4]
	ldr	w1, [x24]
Lloh53:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh54:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh55:
	ldr	w2, [x8]
Lloh56:
	adrp	x3, l_.str.4@PAGE
Lloh57:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_RT_TRACE
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_COMP_SCAN,4,2                  ; @COMP_SCAN
	.comm	_DBG_TRACE,4,2                  ; @DBG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Switch to %s bandwidth\n"

l_.str.1:                               ; @.str.1
	.asciz	"20MHz"

l_.str.2:                               ; @.str.2
	.asciz	"40MHz"

	.comm	_REG_BWOPMODE,8,3               ; @REG_BWOPMODE
	.comm	_REG_RRSR,8,3                   ; @REG_RRSR
	.comm	_BW_OPMODE_20MHZ,4,2            ; @BW_OPMODE_20MHZ
l_.str.3:                               ; @.str.3
	.asciz	"unknown bandwidth: %#X\n"

	.comm	_RFPGA0_RFMOD,4,2               ; @RFPGA0_RFMOD
	.comm	_BRFMOD,4,2                     ; @BRFMOD
	.comm	_RFPGA1_RFMOD,4,2               ; @RFPGA1_RFMOD
	.comm	_RCCK0_SYSTEM,4,2               ; @RCCK0_SYSTEM
	.comm	_BCCK_SIDEBAND,4,2              ; @BCCK_SIDEBAND
	.comm	_ROFDM1_LSTF,4,2                ; @ROFDM1_LSTF
	.comm	_HAL_PRIME_CHNL_OFFSET_LOWER,4,2 ; @HAL_PRIME_CHNL_OFFSET_LOWER
	.comm	_DBG_LOUD,4,2                   ; @DBG_LOUD
l_.str.4:                               ; @.str.4
	.asciz	"\n"

.subsections_via_symbols
