	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rtl8723be_get_txpower_index
__rtl8723be_get_txpower_index:          ## @_rtl8723be_get_txpower_index
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	callq	_rtl_priv
	movq	%rax, %r14
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_efuse
	movq	%rax, %rbx
	leal	-15(%r15), %eax
	cmpl	$-15, %eax
	ja	LBB0_1
## %bb.2:
	movq	_COMP_POWER_TRACKING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_RT_TRACE
	xorl	%r15d, %r15d
	jmp	LBB0_3
LBB0_1:
	decl	%r15d
LBB0_3:
	movl	%r12d, %edi
	callq	_RX_HAL_IS_CCK_RATE
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	(%rbx), %rax
	jmp	LBB0_5
LBB0_6:
	movq	_DESC92C_RATE6M@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jle	LBB0_7
## %bb.8:
	movq	_COMP_POWER_TRACKING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_RT_TRACE
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_7:
	movq	8(%rbx), %rax
LBB0_5:
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	movq	(%rax,%rcx,8), %rax
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,4), %r14d
LBB0_9:
	movq	_DESC92C_RATE6M@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jg	LBB0_13
## %bb.10:
	movq	_DESC92C_RATE54M@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jl	LBB0_13
## %bb.11:
	movl	%r12d, %edi
	callq	_RX_HAL_IS_CCK_RATE
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	_TX_1S@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addl	(%rax,%rcx,4), %r14d
LBB0_13:
	movq	_HT_CHANNEL_WIDTH_20@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_20
## %bb.14:
	movq	_DESC92C_RATEMCS0@GOTPCREL(%rip), %rcx
	movq	_DESC92C_RATEMCS15@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r12d, (%rcx)
	jg	LBB0_17
## %bb.15:
	cmpl	%r12d, %eax
	jl	LBB0_17
## %bb.16:
	movq	24(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	_TX_1S@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addl	(%rcx,%rdx,4), %r14d
LBB0_17:
	movq	_DESC92C_RATEMCS8@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	jg	LBB0_28
## %bb.18:
	cmpl	%r12d, %eax
	jl	LBB0_28
## %bb.19:
	movq	%rbx, %rax
	addq	$24, %rax
	jmp	LBB0_27
LBB0_20:
	movq	_HT_CHANNEL_WIDTH_20_40@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_28
## %bb.21:
	movq	_DESC92C_RATEMCS0@GOTPCREL(%rip), %rcx
	movq	_DESC92C_RATEMCS15@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r12d, (%rcx)
	jg	LBB0_24
## %bb.22:
	cmpl	%r12d, %eax
	jl	LBB0_24
## %bb.23:
	movq	32(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	_TX_1S@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addl	(%rcx,%rdx,4), %r14d
LBB0_24:
	movq	_DESC92C_RATEMCS8@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	jg	LBB0_28
## %bb.25:
	cmpl	%r12d, %eax
	jl	LBB0_28
## %bb.26:
	movq	%rbx, %rax
	addq	$32, %rax
LBB0_27:
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_TX_2S@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addl	(%rax,%rcx,4), %r14d
LBB0_28:
	xorl	%eax, %eax
	cmpl	$2, 40(%rbx)
	je	LBB0_30
## %bb.29:
	movq	_BAND_ON_2_4G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	callq	__rtl8723be_get_txpower_by_rate
LBB0_30:
	addl	%r14d, %eax
	movq	_MAX_POWER_INDEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovgel	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMP_POWER_TRACKING,4,2        ## @COMP_POWER_TRACKING
	.comm	_DBG_LOUD,4,2                   ## @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Illegal channel!\n"

	.comm	_DESC92C_RATE6M,4,2             ## @DESC92C_RATE6M
L_.str.1:                               ## @.str.1
	.asciz	"invalid rate\n"

	.comm	_DESC92C_RATE54M,4,2            ## @DESC92C_RATE54M
	.comm	_TX_1S,8,3                      ## @TX_1S
	.comm	_HT_CHANNEL_WIDTH_20,4,2        ## @HT_CHANNEL_WIDTH_20
	.comm	_DESC92C_RATEMCS0,4,2           ## @DESC92C_RATEMCS0
	.comm	_DESC92C_RATEMCS15,4,2          ## @DESC92C_RATEMCS15
	.comm	_DESC92C_RATEMCS8,4,2           ## @DESC92C_RATEMCS8
	.comm	_TX_2S,8,3                      ## @TX_2S
	.comm	_HT_CHANNEL_WIDTH_20_40,4,2     ## @HT_CHANNEL_WIDTH_20_40
	.comm	_BAND_ON_2_4G,4,2               ## @BAND_ON_2_4G
	.comm	_MAX_POWER_INDEX,4,2            ## @MAX_POWER_INDEX
	.no_dead_strip	__rtl8723be_get_txpower_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _rtl8723be_get_txpower_index
__rtl8723be_get_txpower_index:          ; @_rtl8723be_get_txpower_index
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x25, x4
	mov	x23, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_rtl_priv
	mov	x24, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_efuse
	mov	x22, x0
	sub	w8, w25, #15
	cmn	w8, #15
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _COMP_POWER_TRACKING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMP_POWER_TRACKING@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, x24
	bl	_RT_TRACE
	mov	w26, #0
	b	LBB0_3
LBB0_2:
	sub	w26, w25, #1
LBB0_3:
	mov	x0, x19
	bl	_RX_HAL_IS_CCK_RATE
Lloh8:
	adrp	x25, _DESC92C_RATE6M@GOTPAGE
Lloh9:
	ldr	x25, [x25, _DESC92C_RATE6M@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x22]
	b	LBB0_8
LBB0_5:
	ldr	w8, [x25]
	cmp	w8, w19
	b.le	LBB0_7
; %bb.6:
Lloh10:
	adrp	x8, _COMP_POWER_TRACKING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _COMP_POWER_TRACKING@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x3, l_.str.1@PAGE
Lloh17:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x24
	bl	_RT_TRACE
	mov	w24, #0
	b	LBB0_9
LBB0_7:
	ldr	x8, [x22, #8]
LBB0_8:
	ldr	x8, [x8, w20, sxtw #3]
	ldr	w24, [x8, w26, sxtw #2]
LBB0_9:
	ldr	w8, [x25]
Lloh18:
	adrp	x9, _DESC92C_RATE54M@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DESC92C_RATE54M@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #8, le
	b.lt	LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_RX_HAL_IS_CCK_RATE
	cbnz	x0, LBB0_12
; %bb.11:
	ldr	x8, [x22, #16]
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _TX_1S@GOTPAGE
Lloh22:
	ldr	x9, [x9, _TX_1S@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	add	w24, w8, w24
LBB0_12:
Lloh24:
	adrp	x8, _HT_CHANNEL_WIDTH_20@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HT_CHANNEL_WIDTH_20@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_17
; %bb.13:
Lloh27:
	adrp	x8, _DESC92C_RATEMCS0@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DESC92C_RATEMCS0@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x8]
Lloh30:
	adrp	x8, _DESC92C_RATEMCS15@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DESC92C_RATEMCS15@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w9, w19
	ccmp	w8, w19, #8, le
	b.lt	LBB0_15
; %bb.14:
	ldr	x9, [x22, #24]
	ldr	x9, [x9]
Lloh33:
	adrp	x10, _TX_1S@GOTPAGE
Lloh34:
	ldr	x10, [x10, _TX_1S@GOTPAGEOFF]
Lloh35:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
	add	w24, w9, w24
LBB0_15:
Lloh36:
	adrp	x9, _DESC92C_RATEMCS8@GOTPAGE
Lloh37:
	ldr	x9, [x9, _DESC92C_RATEMCS8@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	cmp	w9, w19
	ccmp	w8, w19, #8, le
	b.lt	LBB0_24
; %bb.16:
	add	x8, x22, #24
	b	LBB0_23
LBB0_17:
Lloh39:
	adrp	x8, _HT_CHANNEL_WIDTH_20_40@GOTPAGE
Lloh40:
	ldr	x8, [x8, _HT_CHANNEL_WIDTH_20_40@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_24
; %bb.18:
Lloh42:
	adrp	x8, _DESC92C_RATEMCS0@GOTPAGE
Lloh43:
	ldr	x8, [x8, _DESC92C_RATEMCS0@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x8]
Lloh45:
	adrp	x8, _DESC92C_RATEMCS15@GOTPAGE
Lloh46:
	ldr	x8, [x8, _DESC92C_RATEMCS15@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	cmp	w9, w19
	ccmp	w8, w19, #8, le
	b.lt	LBB0_20
; %bb.19:
	ldr	x9, [x22, #32]
	ldr	x9, [x9]
Lloh48:
	adrp	x10, _TX_1S@GOTPAGE
Lloh49:
	ldr	x10, [x10, _TX_1S@GOTPAGEOFF]
Lloh50:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
	add	w24, w9, w24
LBB0_20:
Lloh51:
	adrp	x9, _DESC92C_RATEMCS8@GOTPAGE
Lloh52:
	ldr	x9, [x9, _DESC92C_RATEMCS8@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	cmp	w9, w19
	b.gt	LBB0_24
; %bb.21:
	cmp	w8, w19
	b.lt	LBB0_24
; %bb.22:
	add	x8, x22, #32
LBB0_23:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh54:
	adrp	x9, _TX_2S@GOTPAGE
Lloh55:
	ldr	x9, [x9, _TX_2S@GOTPAGEOFF]
Lloh56:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	add	w24, w8, w24
LBB0_24:
	ldr	w8, [x22, #40]
	cmp	w8, #2
	b.ne	LBB0_26
; %bb.25:
	mov	w0, #0
	b	LBB0_27
LBB0_26:
Lloh57:
	adrp	x8, _BAND_ON_2_4G@GOTPAGE
Lloh58:
	ldr	x8, [x8, _BAND_ON_2_4G@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	__rtl8723be_get_txpower_by_rate
LBB0_27:
Lloh60:
	adrp	x8, _MAX_POWER_INDEX@GOTPAGE
Lloh61:
	ldr	x8, [x8, _MAX_POWER_INDEX@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	add	w9, w0, w24
	cmp	w9, w8
	csel	w0, w9, w8, lt
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.comm	_COMP_POWER_TRACKING,4,2        ; @COMP_POWER_TRACKING
	.comm	_DBG_LOUD,4,2                   ; @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Illegal channel!\n"

	.comm	_DESC92C_RATE6M,4,2             ; @DESC92C_RATE6M
l_.str.1:                               ; @.str.1
	.asciz	"invalid rate\n"

	.comm	_DESC92C_RATE54M,4,2            ; @DESC92C_RATE54M
	.comm	_TX_1S,8,3                      ; @TX_1S
	.comm	_HT_CHANNEL_WIDTH_20,4,2        ; @HT_CHANNEL_WIDTH_20
	.comm	_DESC92C_RATEMCS0,4,2           ; @DESC92C_RATEMCS0
	.comm	_DESC92C_RATEMCS15,4,2          ; @DESC92C_RATEMCS15
	.comm	_DESC92C_RATEMCS8,4,2           ; @DESC92C_RATEMCS8
	.comm	_TX_2S,8,3                      ; @TX_2S
	.comm	_HT_CHANNEL_WIDTH_20_40,4,2     ; @HT_CHANNEL_WIDTH_20_40
	.comm	_BAND_ON_2_4G,4,2               ; @BAND_ON_2_4G
	.comm	_MAX_POWER_INDEX,4,2            ; @MAX_POWER_INDEX
	.no_dead_strip	__rtl8723be_get_txpower_index
.subsections_via_symbols
