	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw8822c_set_tx_power_index
_rtw8822c_set_tx_power_index:           ## @rtw8822c_set_tx_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	_RF_PATH_A@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	_DESC_RATE11M@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rsi
	movq	%rsi, -64(%rbp)
	movq	_RF_PATH_B@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	(%rax,%rsi,8), %rax
	movq	(%rax,%rdx,8), %rdx
	movq	%rdx, -56(%rbp)
	movq	_DESC_RATEMCS7@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	%rcx, -80(%rbp)
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -72(%rbp)
	leaq	-64(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	callq	_rtw8822c_set_write_tx_power_ref
	movq	_RTW_RATE_SECTION_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	_rtw_rate_size@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%r14d, %r14d
	leaq	-72(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_RTW_RATE_SECTION_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	cmpq	%rax, %r14
	jae	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpq	$0, (%rcx,%r14,8)
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%r12
	movq	_rtw_rate_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	(%rcx,%r14,8), %r12
	jae	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%r14, %r14
	movq	_rtw_rate_section@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rax
	movq	(%rax,%r12,8), %rbx
	movq	(%r13), %rax
	movq	_RF_PATH_B@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	leaq	-80(%rbp), %rdx
	leaq	-64(%rbp), %rsi
	cmoveq	%rsi, %rdx
	movq	%r15, %rdi
	leaq	-56(%rbp), %rsi
	cmoveq	%rsi, %rdi
	movq	(%rcx,%rbx,8), %rsi
	subq	(%rdi), %rsi
	movq	_RF_PATH_A@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax,%rbx,8), %rdi
	subq	(%rdx), %rdi
	callq	_min
	movl	%ebx, %ecx
	andl	$3, %ecx
	movq	%rax, -112(%rbp,%rcx,8)
	cmpq	$3, %rcx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	addq	$-3, %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	leaq	-112(%rbp), %rdx
	callq	_rtw8822c_set_tx_power_diff
	jmp	LBB0_6
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RF_PATH_A,8,3                  ## @RF_PATH_A
	.comm	_DESC_RATE11M,8,3               ## @DESC_RATE11M
	.comm	_RF_PATH_B,8,3                  ## @RF_PATH_B
	.comm	_DESC_RATEMCS7,8,3              ## @DESC_RATEMCS7
	.comm	_RTW_RATE_SECTION_MAX,8,3       ## @RTW_RATE_SECTION_MAX
	.comm	_rtw_rate_size,8,3              ## @rtw_rate_size
	.comm	_rtw_rate_section,8,3           ## @rtw_rate_section
	.no_dead_strip	_rtw8822c_set_tx_power_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw8822c_set_tx_power_index
_rtw8822c_set_tx_power_index:           ; @rtw8822c_set_tx_power_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
Lloh3:
	adrp	x9, _RF_PATH_A@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RF_PATH_A@GOTPAGEOFF]
	ldr	x8, [x0]
Lloh5:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
Lloh6:
	adrp	x10, _DESC_RATE11M@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DESC_RATE11M@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	lsl	x10, x10, #3
	ldr	x11, [x9, x10]
Lloh9:
	adrp	x21, _RF_PATH_B@GOTPAGE
Lloh10:
	ldr	x21, [x21, _RF_PATH_B@GOTPAGEOFF]
	str	x11, [sp, #56]
	ldr	x11, [x21]
	ldr	x8, [x8, x11, lsl #3]
	ldr	x10, [x8, x10]
	str	x10, [sp, #64]
Lloh11:
	adrp	x10, _DESC_RATEMCS7@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DESC_RATEMCS7@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	lsl	x10, x10, #3
	ldr	x9, [x9, x10]
	str	x9, [sp, #40]
	ldr	x8, [x8, x10]
	str	x8, [sp, #48]
	add	x22, sp, #56
	add	x23, sp, #40
	add	x1, sp, #56
	add	x2, sp, #40
	bl	_rtw8822c_set_write_tx_power_ref
Lloh14:
	adrp	x8, _RTW_RATE_SECTION_MAX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RTW_RATE_SECTION_MAX@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x8]
	cbz	x9, LBB0_9
; %bb.1:
	mov	x25, #0
Lloh17:
	adrp	x26, _rtw_rate_size@GOTPAGE
Lloh18:
	ldr	x26, [x26, _rtw_rate_size@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh19:
	adrp	x27, _rtw_rate_section@GOTPAGE
Lloh20:
	ldr	x27, [x27, _rtw_rate_section@GOTPAGEOFF]
	add	x28, sp, #8
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh21:
	adrp	x9, _RTW_RATE_SECTION_MAX@GOTPAGE
Lloh22:
	ldr	x9, [x9, _RTW_RATE_SECTION_MAX@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	cmp	x25, x9
	b.hs	LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x10, [x8, x25, lsl #3]
	cbz	x10, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x24, x24, #1
	ldr	x8, [x26]
	ldr	x9, [x8, x25, lsl #3]
	cmp	x24, x9
	b.hs	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x27]
	ldr	x8, [x8, x25, lsl #3]
	ldr	x20, [x8, x24, lsl #3]
	ldr	x8, [x19]
Lloh24:
	adrp	x9, _RF_PATH_A@GOTPAGE
Lloh25:
	ldr	x9, [x9, _RF_PATH_A@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
	lsl	x10, x20, #3
	ldr	x9, [x9, x10]
	ldr	x11, [x21]
	ldr	x8, [x8, x11, lsl #3]
	ldr	x8, [x8, x10]
	add	x10, x22, #8
	add	x11, x23, #8
	cmp	x25, #0
	csel	x12, x22, x23, eq
	ldr	x12, [x12]
	csel	x10, x10, x11, eq
	ldr	x10, [x10]
	sub	x1, x8, x10
	sub	x0, x9, x12
	bl	_min
	and	x8, x20, #0x3
	str	x0, [x28, x8, lsl #3]
	cmp	x8, #3
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	sub	x1, x20, #3
	add	x2, sp, #8
	mov	x0, x19
	bl	_rtw8822c_set_tx_power_diff
	b	LBB0_6
LBB0_9:
	ldr	x8, [sp, #72]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_RF_PATH_A,8,3                  ; @RF_PATH_A
	.comm	_DESC_RATE11M,8,3               ; @DESC_RATE11M
	.comm	_RF_PATH_B,8,3                  ; @RF_PATH_B
	.comm	_DESC_RATEMCS7,8,3              ; @DESC_RATEMCS7
	.comm	_RTW_RATE_SECTION_MAX,8,3       ; @RTW_RATE_SECTION_MAX
	.comm	_rtw_rate_size,8,3              ; @rtw_rate_size
	.comm	_rtw_rate_section,8,3           ; @rtw_rate_section
	.no_dead_strip	_rtw8822c_set_tx_power_index
.subsections_via_symbols
