	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rtl8812ae_phy_convert_txpower_limit_to_power_index
__rtl8812ae_phy_convert_txpower_limit_to_power_index: ## @_rtl8812ae_phy_convert_txpower_limit_to_power_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_rtl_priv
	movq	_COMP_INIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	__rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit
	movq	_MAX_REGULATION_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_52
## %bb.1:
	movq	_MAX_2_4G_BANDWIDTH_NUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%esi, %esi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_41:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX_REGULATION_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_42:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	movslq	%eax, %rdx
	cmpq	%rdx, %rsi
	jge	LBB0_18
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
                                        ##         Child Loop BB0_8 Depth 4
                                        ##           Child Loop BB0_14 Depth 5
	testl	%ecx, %ecx
	jle	LBB0_42
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_CHANNEL_MAX_NUMBER_2G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_39:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	_MAX_2_4G_BANDWIDTH_NUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_40:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%rdi
	movslq	%ecx, %rdx
	cmpq	%rdx, %rdi
	jge	LBB0_41
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
                                        ##         Child Loop BB0_8 Depth 4
                                        ##           Child Loop BB0_14 Depth 5
	testl	%eax, %eax
	jle	LBB0_40
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_MAX_RATE_SECTION_NUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r13d, %r13d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	_CHANNEL_MAX_NUMBER_2G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_38:                                ##   in Loop: Header=BB0_6 Depth=3
	incq	%r13
	movslq	%eax, %rdx
	cmpq	%rdx, %r13
	jge	LBB0_39
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_8 Depth 4
                                        ##           Child Loop BB0_14 Depth 5
	testl	%ecx, %ecx
	jle	LBB0_38
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_36:                                ##   in Loop: Header=BB0_8 Depth=4
	incq	%r15
	movq	_MAX_RATE_SECTION_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %r15
	jge	LBB0_37
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ##       Parent Loop BB0_6 Depth=3
                                        ## =>      This Loop Header: Depth=4
                                        ##           Child Loop BB0_14 Depth 5
	cmpl	$3, %r15d
	ja	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=4
	movslq	%r15d, %rax
	leaq	l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_BAND_ON_2_4G@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	__rtl8812ae_phy_get_txpower_by_rate_base_index
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=4
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_MAX_RF_PATH_NUM@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jle	LBB0_36
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=4
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rcx,%r15,8), %rcx
	movq	(%rcx,%r13,8), %rcx
	movl	(%rcx,%rax,4), %r12d
	xorl	%ecx, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	cmpl	$63, %r12d
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=4
	movl	%r12d, %ecx
	shrl	$31, %ecx
	addl	%r12d, %ecx
	sarl	%ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=4
	movslq	-44(%rbp), %r14                 ## 4-byte Folded Reload
	movslq	%eax, %rbx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_14 Depth=5
	movl	%r12d, %r11d
	subl	%r10d, %r11d
	movq	(%rdi), %rax
	movq	(%rax,%r8,8), %rax
	movq	(%rax,%r9,8), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax,%r13,8), %rax
	movl	%r11d, (%rax,%rbx,4)
LBB0_35:                                ##   in Loop: Header=BB0_14 Depth=5
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rcx
                                        ## kill: def $r8d killed $r8d killed $r8
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	pushq	%r10
	pushq	%rbx
	pushq	%r13
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	%r11
	pushq	%r13
	pushq	%r15
	callq	_RT_TRACE
	addq	$64, %rsp
	incq	%rbx
	movq	_MAX_RF_PATH_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_36
LBB0_14:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ##       Parent Loop BB0_6 Depth=3
                                        ##         Parent Loop BB0_8 Depth=4
                                        ## =>        This Inner Loop Header: Depth=5
	movq	_RF_1TX@GOTPCREL(%rip), %rax
	cmpq	$3, %r15
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=5
	movq	_RF_2TX@GOTPCREL(%rip), %rax
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=5
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	(%rax), %rax
	movq	(%rcx,%rax,8), %rax
	movl	(%rax,%r14,4), %r10d
	movq	_MAX_POWER_INDEX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	jne	LBB0_34
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=5
	movq	(%rdi), %rax
	movq	(%rax,%r8,8), %rax
	movq	(%rax,%r9,8), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%rbx,4), %r11d
	jmp	LBB0_35
LBB0_18:
	testl	%eax, %eax
	jle	LBB0_52
## %bb.19:
	movq	_MAX_5G_BANDWIDTH_NUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%esi, %esi
	movl	$0, -84(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_50:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	_MAX_REGULATION_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_51:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%rsi
	movslq	%eax, %rdx
	cmpq	%rdx, %rsi
	jge	LBB0_52
LBB0_20:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_22 Depth 2
                                        ##       Child Loop BB0_24 Depth 3
                                        ##         Child Loop BB0_26 Depth 4
                                        ##           Child Loop BB0_30 Depth 5
	testl	%ecx, %ecx
	jle	LBB0_51
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_CHANNEL_MAX_NUMBER_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_22 Depth=2
	movq	_MAX_5G_BANDWIDTH_NUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_49:                                ##   in Loop: Header=BB0_22 Depth=2
	incq	%rdi
	movslq	%ecx, %rdx
	cmpq	%rdx, %rdi
	jge	LBB0_50
LBB0_22:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_24 Depth 3
                                        ##         Child Loop BB0_26 Depth 4
                                        ##           Child Loop BB0_30 Depth 5
	testl	%eax, %eax
	jle	LBB0_49
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=2
	movq	_MAX_RATE_SECTION_NUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r13d, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_46:                                ##   in Loop: Header=BB0_24 Depth=3
	movq	_CHANNEL_MAX_NUMBER_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_47:                                ##   in Loop: Header=BB0_24 Depth=3
	incq	%r13
	movslq	%eax, %rdx
	cmpq	%rdx, %r13
	jge	LBB0_48
LBB0_24:                                ##   Parent Loop BB0_20 Depth=1
                                        ##     Parent Loop BB0_22 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_26 Depth 4
                                        ##           Child Loop BB0_30 Depth 5
	testl	%ecx, %ecx
	jle	LBB0_47
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=3
	xorl	%r15d, %r15d
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_45:                                ##   in Loop: Header=BB0_26 Depth=4
	incq	%r15
	movq	_MAX_RATE_SECTION_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %r15
	jge	LBB0_46
LBB0_26:                                ##   Parent Loop BB0_20 Depth=1
                                        ##     Parent Loop BB0_22 Depth=2
                                        ##       Parent Loop BB0_24 Depth=3
                                        ## =>      This Loop Header: Depth=4
                                        ##           Child Loop BB0_30 Depth 5
	leal	-1(%r15), %eax
	cmpl	$4, %eax
	ja	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=4
	cltq
	leaq	l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index.4(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_BAND_ON_5G@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	__rtl8812ae_phy_get_txpower_by_rate_base_index
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
LBB0_28:                                ##   in Loop: Header=BB0_26 Depth=4
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_MAX_RF_PATH_NUM@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jle	LBB0_45
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=4
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rcx,%r15,8), %rcx
	movq	(%rcx,%r13,8), %rcx
	movl	(%rcx,%rax,4), %r12d
	movslq	-84(%rbp), %rcx                 ## 4-byte Folded Reload
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movslq	%eax, %r14
	leal	-3(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_43:                                ##   in Loop: Header=BB0_30 Depth=5
	movl	%r12d, %ebx
	subl	%r10d, %ebx
	movq	16(%rdi), %rax
	movq	(%rax,%r8,8), %rax
	movq	(%rax,%r9,8), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax,%r13,8), %rax
	movl	%ebx, (%rax,%r14,4)
LBB0_44:                                ##   in Loop: Header=BB0_30 Depth=5
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subq	$8, %rsp
	leaq	L_.str.2(%rip), %rcx
                                        ## kill: def $r8d killed $r8d killed $r8
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	pushq	%r10
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%r13
	pushq	%r15
	callq	_RT_TRACE
	addq	$64, %rsp
	incq	%r14
	movq	_MAX_RF_PATH_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r14
	jge	LBB0_45
LBB0_30:                                ##   Parent Loop BB0_20 Depth=1
                                        ##     Parent Loop BB0_22 Depth=2
                                        ##       Parent Loop BB0_24 Depth=3
                                        ##         Parent Loop BB0_26 Depth=4
                                        ## =>        This Inner Loop Header: Depth=5
	movq	_RF_1TX@GOTPCREL(%rip), %rax
	testl	$-3, -44(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=5
	movq	_RF_2TX@GOTPCREL(%rip), %rax
LBB0_32:                                ##   in Loop: Header=BB0_30 Depth=5
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	24(%rdi), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	(%rax), %rax
	movq	(%rcx,%rax,8), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %r10d
	movq	_MAX_POWER_INDEX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	jne	LBB0_43
## %bb.33:                              ##   in Loop: Header=BB0_30 Depth=5
	movq	16(%rdi), %rax
	movq	(%rax,%r8,8), %rax
	movq	(%rax,%r9,8), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%r14,4), %ebx
	jmp	LBB0_44
LBB0_52:
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RT_TRACE                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_COMP_INIT,4,2                  ## @COMP_INIT
	.comm	_DBG_TRACE,4,2                  ## @DBG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"=====> _rtl8812ae_phy_convert_txpower_limit_to_power_index()\n"

	.comm	_MAX_REGULATION_NUM,4,2         ## @MAX_REGULATION_NUM
	.comm	_MAX_2_4G_BANDWIDTH_NUM,4,2     ## @MAX_2_4G_BANDWIDTH_NUM
	.comm	_CHANNEL_MAX_NUMBER_2G,4,2      ## @CHANNEL_MAX_NUMBER_2G
	.comm	_MAX_RATE_SECTION_NUM,4,2       ## @MAX_RATE_SECTION_NUM
	.comm	_BAND_ON_2_4G,4,2               ## @BAND_ON_2_4G
	.comm	_MGN_11M,4,2                    ## @MGN_11M
	.comm	_MGN_54M,4,2                    ## @MGN_54M
	.comm	_MGN_MCS7,4,2                   ## @MGN_MCS7
	.comm	_MGN_MCS15,4,2                  ## @MGN_MCS15
	.comm	_RF90_PATH_A,8,3                ## @RF90_PATH_A
	.comm	_MAX_RF_PATH_NUM,4,2            ## @MAX_RF_PATH_NUM
	.comm	_RF_2TX,8,3                     ## @RF_2TX
	.comm	_RF_1TX,8,3                     ## @RF_1TX
	.comm	_MAX_POWER_INDEX,4,2            ## @MAX_POWER_INDEX
L_.str.1:                               ## @.str.1
	.asciz	"TxPwrLimit_2_4G[regulation %d][bw %d][rateSection %d][channel %d] = %d\n(TxPwrLimit in dBm %d - BW40PwrLmt2_4G[channel %d][rfpath %d] %d)\n"

	.comm	_MAX_5G_BANDWIDTH_NUM,4,2       ## @MAX_5G_BANDWIDTH_NUM
	.comm	_CHANNEL_MAX_NUMBER_5G,4,2      ## @CHANNEL_MAX_NUMBER_5G
	.comm	_BAND_ON_5G,4,2                 ## @BAND_ON_5G
	.comm	_MGN_VHT1SS_MCS7,4,2            ## @MGN_VHT1SS_MCS7
	.comm	_MGN_VHT2SS_MCS7,4,2            ## @MGN_VHT2SS_MCS7
L_.str.2:                               ## @.str.2
	.asciz	"TxPwrLimit_5G[regulation %d][bw %d][rateSection %d][channel %d] =%d\n(TxPwrLimit in dBm %d - BW40PwrLmt5G[chnl group %d][rfpath %d] %d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"<===== _rtl8812ae_phy_convert_txpower_limit_to_power_index()\n"

	.no_dead_strip	__rtl8812ae_phy_convert_txpower_limit_to_power_index
	.section	__DATA,__const
	.p2align	3                               ## @switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index
l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index:
	.quad	_MGN_11M
	.quad	_MGN_54M
	.quad	_MGN_MCS7
	.quad	_MGN_MCS15

	.p2align	3                               ## @switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index.4
l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index.4:
	.quad	_MGN_54M
	.quad	_MGN_MCS7
	.quad	_MGN_MCS15
	.quad	_MGN_VHT1SS_MCS7
	.quad	_MGN_VHT2SS_MCS7

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _rtl8812ae_phy_convert_txpower_limit_to_power_index
__rtl8812ae_phy_convert_txpower_limit_to_power_index: ; @_rtl8812ae_phy_convert_txpower_limit_to_power_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_rtl_priv
	mov	x20, x0
Lloh0:
	adrp	x8, _COMP_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMP_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _DBG_TRACE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DBG_TRACE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	bl	_RT_TRACE
	str	x19, [sp, #72]                  ; 8-byte Folded Spill
	mov	x0, x19
	bl	__rtl8812ae_phy_cross_reference_ht_and_vht_txpower_limit
Lloh8:
	adrp	x8, _MAX_REGULATION_NUM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_REGULATION_NUM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_46
; %bb.1:
	str	xzr, [sp, #96]                  ; 8-byte Folded Spill
	str	xzr, [sp, #80]                  ; 8-byte Folded Spill
Lloh11:
	adrp	x9, _MAX_2_4G_BANDWIDTH_NUM@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAX_2_4G_BANDWIDTH_NUM@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh14:
	adrp	x8, _MAX_REGULATION_NUM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX_REGULATION_NUM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [sp, #96]                  ; 8-byte Folded Reload
	add	x10, x10, #1
	str	x10, [sp, #96]                  ; 8-byte Folded Spill
	cmp	x10, w8, sxtw
	b.ge	LBB0_23
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;         Child Loop BB0_15 Depth 4
                                        ;           Child Loop BB0_21 Depth 5
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	stur	xzr, [x29, #-88]                ; 8-byte Folded Spill
Lloh17:
	adrp	x8, _CHANNEL_MAX_NUMBER_2G@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CHANNEL_MAX_NUMBER_2G@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	x10, [sp, #96]                  ; 8-byte Folded Reload
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	str	x10, [sp, #88]                  ; 8-byte Folded Spill
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
Lloh20:
	adrp	x9, _MAX_2_4G_BANDWIDTH_NUM@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MAX_2_4G_BANDWIDTH_NUM@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldur	x10, [x29, #-88]                ; 8-byte Folded Reload
	add	x10, x10, #1
	stur	x10, [x29, #-88]                ; 8-byte Folded Spill
	cmp	x10, w9, sxtw
	b.ge	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;         Child Loop BB0_15 Depth 4
                                        ;           Child Loop BB0_21 Depth 5
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x26, #0
Lloh23:
	adrp	x9, _MAX_RATE_SECTION_NUM@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MAX_RATE_SECTION_NUM@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	ldur	x21, [x29, #-88]                ; 8-byte Folded Reload
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=3
Lloh26:
	adrp	x8, _CHANNEL_MAX_NUMBER_2G@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CHANNEL_MAX_NUMBER_2G@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=3
	add	x26, x26, #1
	cmp	x26, w8, sxtw
	b.ge	LBB0_6
LBB0_12:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_15 Depth 4
                                        ;           Child Loop BB0_21 Depth 5
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=3
	mov	x19, #0
	mov	x24, x26
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=4
	add	x19, x19, #1
Lloh29:
	adrp	x8, _MAX_RATE_SECTION_NUM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MAX_RATE_SECTION_NUM@GOTPAGEOFF]
Lloh31:
	ldrsw	x9, [x8]
	cmp	x19, x9
	b.ge	LBB0_10
LBB0_15:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ;       Parent Loop BB0_12 Depth=3
                                        ; =>      This Loop Header: Depth=4
                                        ;           Child Loop BB0_21 Depth 5
	mov	x28, x19
	cmp	w19, #3
	b.hi	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=4
	sbfiz	x8, x19, #3, #32
Lloh32:
	adrp	x9, l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index@PAGE
Lloh33:
	add	x9, x9, l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index@PAGEOFF
	ldr	x8, [x9, x8]
Lloh34:
	adrp	x9, _BAND_ON_2_4G@GOTPAGE
Lloh35:
	ldr	x9, [x9, _BAND_ON_2_4G@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x9]
	ldr	w2, [x8]
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
	bl	__rtl8812ae_phy_get_txpower_by_rate_base_index
	str	x0, [sp, #80]                   ; 8-byte Folded Spill
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=4
Lloh37:
	adrp	x8, _RF90_PATH_A@GOTPAGE
Lloh38:
	ldr	x8, [x8, _RF90_PATH_A@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
Lloh40:
	adrp	x9, _MAX_RF_PATH_NUM@GOTPAGE
Lloh41:
	ldr	x9, [x9, _MAX_RF_PATH_NUM@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	cmp	w9, w8
	b.le	LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=4
	ldr	x9, [x20]
	ldr	x10, [sp, #96]                  ; 8-byte Folded Reload
	ldr	x9, [x9, x10, lsl #3]
	ldur	x10, [x29, #-88]                ; 8-byte Folded Reload
	ldr	x9, [x9, x10, lsl #3]
	ldr	x9, [x9, x19, lsl #3]
	ldr	x9, [x9, x26, lsl #3]
	ldr	w22, [x9, x8, lsl #2]
	ldr	x9, [sp, #80]                   ; 8-byte Folded Reload
	sxtw	x23, w9
	cmp	w22, #0
	cinc	w9, w22, lt
	asr	w9, w9, #1
	cmp	w22, #63
	csel	w27, wzr, w9, eq
	sxtw	x25, w8
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_21 Depth=5
	sub	w9, w22, w8
	ldr	x10, [x20]
	ldr	x11, [sp, #96]                  ; 8-byte Folded Reload
	ldr	x10, [x10, x11, lsl #3]
	ldur	x11, [x29, #-88]                ; 8-byte Folded Reload
	ldr	x10, [x10, x11, lsl #3]
	ldr	x10, [x10, x19, lsl #3]
	ldr	x10, [x10, x26, lsl #3]
	str	w9, [x10, x25, lsl #2]
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=5
Lloh43:
	adrp	x10, _COMP_INIT@GOTPAGE
Lloh44:
	ldr	x10, [x10, _COMP_INIT@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x10]
Lloh46:
	adrp	x10, _DBG_TRACE@GOTPAGE
Lloh47:
	ldr	x10, [x10, _DBG_TRACE@GOTPAGEOFF]
Lloh48:
	ldr	w2, [x10]
	str	x8, [sp, #64]
	mov	x8, x25
	stp	x24, x8, [sp, #48]
	stp	x9, x27, [sp, #32]
	stp	x28, x24, [sp, #16]
	ldr	x8, [sp, #88]                   ; 8-byte Folded Reload
	stp	x8, x21, [sp]
	mov	x0, x20
Lloh49:
	adrp	x3, l_.str.1@PAGE
Lloh50:
	add	x3, x3, l_.str.1@PAGEOFF
	bl	_RT_TRACE
	add	x25, x25, #1
Lloh51:
	adrp	x8, _MAX_RF_PATH_NUM@GOTPAGE
Lloh52:
	ldr	x8, [x8, _MAX_RF_PATH_NUM@GOTPAGEOFF]
Lloh53:
	ldrsw	x8, [x8]
	cmp	x25, x8
	b.ge	LBB0_14
LBB0_21:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ;       Parent Loop BB0_12 Depth=3
                                        ;         Parent Loop BB0_15 Depth=4
                                        ; =>        This Inner Loop Header: Depth=5
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x25, lsl #3]
	cmp	x19, #3
Lloh54:
	adrp	x9, _RF_2TX@GOTPAGE
Lloh55:
	ldr	x9, [x9, _RF_2TX@GOTPAGEOFF]
Lloh56:
	adrp	x10, _RF_1TX@GOTPAGE
Lloh57:
	ldr	x10, [x10, _RF_1TX@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w8, [x8, x23, lsl #2]
Lloh58:
	adrp	x9, _MAX_POWER_INDEX@GOTPAGE
Lloh59:
	ldr	x9, [x9, _MAX_POWER_INDEX@GOTPAGEOFF]
Lloh60:
	ldr	w9, [x9]
	cmp	w22, w9
	b.ne	LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=5
	ldr	x9, [x20]
	ldr	x10, [sp, #96]                  ; 8-byte Folded Reload
	ldr	x9, [x9, x10, lsl #3]
	ldur	x10, [x29, #-88]                ; 8-byte Folded Reload
	ldr	x9, [x9, x10, lsl #3]
	ldr	x9, [x9, x19, lsl #3]
	ldr	x9, [x9, x26, lsl #3]
	ldr	w9, [x9, x25, lsl #2]
	b	LBB0_20
LBB0_23:
	cmp	w8, #1
	b.lt	LBB0_46
; %bb.24:
	str	xzr, [sp, #96]                  ; 8-byte Folded Spill
	str	xzr, [sp, #80]                  ; 8-byte Folded Spill
Lloh61:
	adrp	x9, _MAX_5G_BANDWIDTH_NUM@GOTPAGE
Lloh62:
	ldr	x9, [x9, _MAX_5G_BANDWIDTH_NUM@GOTPAGEOFF]
Lloh63:
	ldr	w9, [x9]
	b	LBB0_27
LBB0_25:                                ;   in Loop: Header=BB0_27 Depth=1
Lloh64:
	adrp	x8, _MAX_REGULATION_NUM@GOTPAGE
Lloh65:
	ldr	x8, [x8, _MAX_REGULATION_NUM@GOTPAGEOFF]
Lloh66:
	ldr	w8, [x8]
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	x10, [sp, #96]                  ; 8-byte Folded Reload
	add	x10, x10, #1
	str	x10, [sp, #96]                  ; 8-byte Folded Spill
	cmp	x10, w8, sxtw
	b.ge	LBB0_46
LBB0_27:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_31 Depth 2
                                        ;       Child Loop BB0_35 Depth 3
                                        ;         Child Loop BB0_38 Depth 4
                                        ;           Child Loop BB0_44 Depth 5
	cmp	w9, #1
	b.lt	LBB0_26
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	stur	xzr, [x29, #-88]                ; 8-byte Folded Spill
Lloh67:
	adrp	x8, _CHANNEL_MAX_NUMBER_5G@GOTPAGE
Lloh68:
	ldr	x8, [x8, _CHANNEL_MAX_NUMBER_5G@GOTPAGEOFF]
Lloh69:
	ldr	w8, [x8]
	ldr	x10, [sp, #96]                  ; 8-byte Folded Reload
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	str	x10, [sp, #88]                  ; 8-byte Folded Spill
	b	LBB0_31
LBB0_29:                                ;   in Loop: Header=BB0_31 Depth=2
Lloh70:
	adrp	x9, _MAX_5G_BANDWIDTH_NUM@GOTPAGE
Lloh71:
	ldr	x9, [x9, _MAX_5G_BANDWIDTH_NUM@GOTPAGEOFF]
Lloh72:
	ldr	w9, [x9]
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=2
	ldur	x10, [x29, #-88]                ; 8-byte Folded Reload
	add	x10, x10, #1
	stur	x10, [x29, #-88]                ; 8-byte Folded Spill
	cmp	x10, w9, sxtw
	b.ge	LBB0_25
LBB0_31:                                ;   Parent Loop BB0_27 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_35 Depth 3
                                        ;         Child Loop BB0_38 Depth 4
                                        ;           Child Loop BB0_44 Depth 5
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=2
	mov	x24, #0
Lloh73:
	adrp	x9, _MAX_RATE_SECTION_NUM@GOTPAGE
Lloh74:
	ldr	x9, [x9, _MAX_RATE_SECTION_NUM@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	ldur	x25, [x29, #-88]                ; 8-byte Folded Reload
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	b	LBB0_35
LBB0_33:                                ;   in Loop: Header=BB0_35 Depth=3
Lloh76:
	adrp	x8, _CHANNEL_MAX_NUMBER_5G@GOTPAGE
Lloh77:
	ldr	x8, [x8, _CHANNEL_MAX_NUMBER_5G@GOTPAGEOFF]
Lloh78:
	ldr	w8, [x8]
LBB0_34:                                ;   in Loop: Header=BB0_35 Depth=3
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_29
LBB0_35:                                ;   Parent Loop BB0_27 Depth=1
                                        ;     Parent Loop BB0_31 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_38 Depth 4
                                        ;           Child Loop BB0_44 Depth 5
	cmp	w9, #1
	b.lt	LBB0_34
; %bb.36:                               ;   in Loop: Header=BB0_35 Depth=3
	mov	x19, #0
	mov	x26, x24
	b	LBB0_38
LBB0_37:                                ;   in Loop: Header=BB0_38 Depth=4
	add	x19, x19, #1
Lloh79:
	adrp	x8, _MAX_RATE_SECTION_NUM@GOTPAGE
Lloh80:
	ldr	x8, [x8, _MAX_RATE_SECTION_NUM@GOTPAGEOFF]
Lloh81:
	ldrsw	x9, [x8]
	cmp	x19, x9
	b.ge	LBB0_33
LBB0_38:                                ;   Parent Loop BB0_27 Depth=1
                                        ;     Parent Loop BB0_31 Depth=2
                                        ;       Parent Loop BB0_35 Depth=3
                                        ; =>      This Loop Header: Depth=4
                                        ;           Child Loop BB0_44 Depth 5
	mov	x28, x19
	sub	w8, w19, #1
	cmp	w8, #4
	b.hi	LBB0_40
; %bb.39:                               ;   in Loop: Header=BB0_38 Depth=4
Lloh82:
	adrp	x9, l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index.4@PAGE
Lloh83:
	add	x9, x9, l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index.4@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
Lloh84:
	adrp	x9, _BAND_ON_5G@GOTPAGE
Lloh85:
	ldr	x9, [x9, _BAND_ON_5G@GOTPAGEOFF]
Lloh86:
	ldr	w1, [x9]
	ldr	w2, [x8]
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
	bl	__rtl8812ae_phy_get_txpower_by_rate_base_index
	str	x0, [sp, #80]                   ; 8-byte Folded Spill
LBB0_40:                                ;   in Loop: Header=BB0_38 Depth=4
Lloh87:
	adrp	x8, _RF90_PATH_A@GOTPAGE
Lloh88:
	ldr	x8, [x8, _RF90_PATH_A@GOTPAGEOFF]
Lloh89:
	ldr	x8, [x8]
Lloh90:
	adrp	x9, _MAX_RF_PATH_NUM@GOTPAGE
Lloh91:
	ldr	x9, [x9, _MAX_RF_PATH_NUM@GOTPAGEOFF]
Lloh92:
	ldr	w9, [x9]
	cmp	w9, w8
	b.le	LBB0_37
; %bb.41:                               ;   in Loop: Header=BB0_38 Depth=4
	ldr	x9, [x20, #16]
	ldr	x10, [sp, #96]                  ; 8-byte Folded Reload
	ldr	x9, [x9, x10, lsl #3]
	ldur	x10, [x29, #-88]                ; 8-byte Folded Reload
	ldr	x9, [x9, x10, lsl #3]
	ldr	x9, [x9, x19, lsl #3]
	ldr	x9, [x9, x24, lsl #3]
	ldr	w22, [x9, x8, lsl #2]
	ldr	x9, [sp, #80]                   ; 8-byte Folded Reload
	sxtw	x21, w9
	sxtw	x27, w8
	sub	w8, w28, #3
	and	w23, w8, #0xfffffffd
	b	LBB0_44
LBB0_42:                                ;   in Loop: Header=BB0_44 Depth=5
	sub	w9, w22, w8
	ldr	x10, [x20, #16]
	ldr	x11, [sp, #96]                  ; 8-byte Folded Reload
	ldr	x10, [x10, x11, lsl #3]
	ldur	x11, [x29, #-88]                ; 8-byte Folded Reload
	ldr	x10, [x10, x11, lsl #3]
	ldr	x10, [x10, x19, lsl #3]
	ldr	x10, [x10, x24, lsl #3]
	str	w9, [x10, x27, lsl #2]
LBB0_43:                                ;   in Loop: Header=BB0_44 Depth=5
Lloh93:
	adrp	x10, _COMP_INIT@GOTPAGE
Lloh94:
	ldr	x10, [x10, _COMP_INIT@GOTPAGEOFF]
Lloh95:
	ldr	w1, [x10]
Lloh96:
	adrp	x10, _DBG_TRACE@GOTPAGE
Lloh97:
	ldr	x10, [x10, _DBG_TRACE@GOTPAGEOFF]
Lloh98:
	ldr	w2, [x10]
	str	x8, [sp, #64]
	mov	x8, x27
	stp	x26, x8, [sp, #48]
	stp	x9, x22, [sp, #32]
	stp	x28, x26, [sp, #16]
	ldr	x8, [sp, #88]                   ; 8-byte Folded Reload
	stp	x8, x25, [sp]
	mov	x0, x20
Lloh99:
	adrp	x3, l_.str.2@PAGE
Lloh100:
	add	x3, x3, l_.str.2@PAGEOFF
	bl	_RT_TRACE
	add	x27, x27, #1
Lloh101:
	adrp	x8, _MAX_RF_PATH_NUM@GOTPAGE
Lloh102:
	ldr	x8, [x8, _MAX_RF_PATH_NUM@GOTPAGEOFF]
Lloh103:
	ldrsw	x8, [x8]
	cmp	x27, x8
	b.ge	LBB0_37
LBB0_44:                                ;   Parent Loop BB0_27 Depth=1
                                        ;     Parent Loop BB0_31 Depth=2
                                        ;       Parent Loop BB0_35 Depth=3
                                        ;         Parent Loop BB0_38 Depth=4
                                        ; =>        This Inner Loop Header: Depth=5
	ldr	x8, [x20, #24]
	ldr	x8, [x8, x27, lsl #3]
	cmp	w23, #0
Lloh104:
	adrp	x9, _RF_2TX@GOTPAGE
Lloh105:
	ldr	x9, [x9, _RF_2TX@GOTPAGEOFF]
Lloh106:
	adrp	x10, _RF_1TX@GOTPAGE
Lloh107:
	ldr	x10, [x10, _RF_1TX@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w8, [x8, x21, lsl #2]
Lloh108:
	adrp	x9, _MAX_POWER_INDEX@GOTPAGE
Lloh109:
	ldr	x9, [x9, _MAX_POWER_INDEX@GOTPAGEOFF]
Lloh110:
	ldr	w9, [x9]
	cmp	w22, w9
	b.ne	LBB0_42
; %bb.45:                               ;   in Loop: Header=BB0_44 Depth=5
	ldr	x9, [x20, #16]
	ldr	x10, [sp, #96]                  ; 8-byte Folded Reload
	ldr	x9, [x9, x10, lsl #3]
	ldur	x10, [x29, #-88]                ; 8-byte Folded Reload
	ldr	x9, [x9, x10, lsl #3]
	ldr	x9, [x9, x19, lsl #3]
	ldr	x9, [x9, x24, lsl #3]
	ldr	w9, [x9, x27, lsl #2]
	b	LBB0_43
LBB0_46:
Lloh111:
	adrp	x8, _COMP_INIT@GOTPAGE
Lloh112:
	ldr	x8, [x8, _COMP_INIT@GOTPAGEOFF]
Lloh113:
	ldr	w1, [x8]
Lloh114:
	adrp	x8, _DBG_TRACE@GOTPAGE
Lloh115:
	ldr	x8, [x8, _DBG_TRACE@GOTPAGEOFF]
Lloh116:
	ldr	w2, [x8]
Lloh117:
	adrp	x3, l_.str.3@PAGE
Lloh118:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x20
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	b	_RT_TRACE
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpAdd	Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.loh AdrpLdrGot	Lloh106, Lloh107
	.loh AdrpLdrGot	Lloh104, Lloh105
	.loh AdrpAdd	Lloh117, Lloh118
	.loh AdrpLdrGotLdr	Lloh114, Lloh115, Lloh116
	.loh AdrpLdrGotLdr	Lloh111, Lloh112, Lloh113
	.cfi_endproc
                                        ; -- End function
	.comm	_COMP_INIT,4,2                  ; @COMP_INIT
	.comm	_DBG_TRACE,4,2                  ; @DBG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"=====> _rtl8812ae_phy_convert_txpower_limit_to_power_index()\n"

	.comm	_MAX_REGULATION_NUM,4,2         ; @MAX_REGULATION_NUM
	.comm	_MAX_2_4G_BANDWIDTH_NUM,4,2     ; @MAX_2_4G_BANDWIDTH_NUM
	.comm	_CHANNEL_MAX_NUMBER_2G,4,2      ; @CHANNEL_MAX_NUMBER_2G
	.comm	_MAX_RATE_SECTION_NUM,4,2       ; @MAX_RATE_SECTION_NUM
	.comm	_BAND_ON_2_4G,4,2               ; @BAND_ON_2_4G
	.comm	_MGN_11M,4,2                    ; @MGN_11M
	.comm	_MGN_54M,4,2                    ; @MGN_54M
	.comm	_MGN_MCS7,4,2                   ; @MGN_MCS7
	.comm	_MGN_MCS15,4,2                  ; @MGN_MCS15
	.comm	_RF90_PATH_A,8,3                ; @RF90_PATH_A
	.comm	_MAX_RF_PATH_NUM,4,2            ; @MAX_RF_PATH_NUM
	.comm	_RF_2TX,8,3                     ; @RF_2TX
	.comm	_RF_1TX,8,3                     ; @RF_1TX
	.comm	_MAX_POWER_INDEX,4,2            ; @MAX_POWER_INDEX
l_.str.1:                               ; @.str.1
	.asciz	"TxPwrLimit_2_4G[regulation %d][bw %d][rateSection %d][channel %d] = %d\n(TxPwrLimit in dBm %d - BW40PwrLmt2_4G[channel %d][rfpath %d] %d)\n"

	.comm	_MAX_5G_BANDWIDTH_NUM,4,2       ; @MAX_5G_BANDWIDTH_NUM
	.comm	_CHANNEL_MAX_NUMBER_5G,4,2      ; @CHANNEL_MAX_NUMBER_5G
	.comm	_BAND_ON_5G,4,2                 ; @BAND_ON_5G
	.comm	_MGN_VHT1SS_MCS7,4,2            ; @MGN_VHT1SS_MCS7
	.comm	_MGN_VHT2SS_MCS7,4,2            ; @MGN_VHT2SS_MCS7
l_.str.2:                               ; @.str.2
	.asciz	"TxPwrLimit_5G[regulation %d][bw %d][rateSection %d][channel %d] =%d\n(TxPwrLimit in dBm %d - BW40PwrLmt5G[chnl group %d][rfpath %d] %d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"<===== _rtl8812ae_phy_convert_txpower_limit_to_power_index()\n"

	.no_dead_strip	__rtl8812ae_phy_convert_txpower_limit_to_power_index
	.section	__DATA,__const
	.p2align	3                               ; @switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index
l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index:
	.quad	_MGN_11M
	.quad	_MGN_54M
	.quad	_MGN_MCS7
	.quad	_MGN_MCS15

	.p2align	3                               ; @switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index.4
l_switch.table._rtl8812ae_phy_convert_txpower_limit_to_power_index.4:
	.quad	_MGN_54M
	.quad	_MGN_MCS7
	.quad	_MGN_MCS15
	.quad	_MGN_VHT1SS_MCS7
	.quad	_MGN_VHT2SS_MCS7

.subsections_via_symbols
