	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_fill_txpower_tbl
_il4965_fill_txpower_tbl:               ## @il4965_fill_txpower_tbl
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movq	%rsi, %rdx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %eax
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r15d, %esi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_D_TXPOWER
	movl	40(%r14), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_il_get_channel_info
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_il_is_channel_valid
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%r15d, %edi
	callq	_il4965_get_tx_atten_grp
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_3
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_D_TXPOWER
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.7:
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_9
## %bb.8:
	addl	$-2, %r15d
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_IL_ERR
	jmp	LBB0_4
LBB0_9:
	addl	$2, %r15d
LBB0_10:
	xorl	%eax, %eax
	testq	%rbx, %rbx
	sete	%cl
	xorl	%esi, %esi
	movq	_IL_TX_POWER_SATURATION_MIN@GOTPCREL(%rip), %rdx
	movq	_IL_TX_POWER_SATURATION_MAX@GOTPCREL(%rip), %rdi
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	sete	%sil
	movq	32(%r14), %rbx
	movq	(%rbx,%rsi,8), %rsi
	jne	LBB0_11
## %bb.12:
	movq	_IL_TX_POWER_DEFAULT_SATURATION_52@GOTPCREL(%rip), %rbx
	jmp	LBB0_13
LBB0_11:
	movq	_IL_TX_POWER_DEFAULT_SATURATION_24@GOTPCREL(%rip), %rbx
LBB0_13:
	cmpq	(%rdi), %rsi
	movq	(%rbx), %rdi
	movq	%rsi, %rbx
	cmovgq	%rdi, %rbx
	cmpq	(%rdx), %rsi
	cmovlq	%rdi, %rbx
	movq	%rbx, -120(%rbp)                ## 8-byte Spill
	movb	%cl, %al
	movl	(%r13,%rax,4), %ecx
	addl	%ecx, %ecx
	movq	_IL_TX_POWER_REGULATORY_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jl	LBB0_15
## %bb.14:
	movq	_IL_TX_POWER_REGULATORY_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jle	LBB0_19
LBB0_15:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_17
## %bb.16:
	movq	_IL_TX_POWER_DEFAULT_REGULATORY_24@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_17:
	movq	_IL_TX_POWER_DEFAULT_REGULATORY_52@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %ecx
LBB0_19:
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	leaq	-104(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_il4965_interpolate_chan
	movq	32(%r14), %rax
	movl	16(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %r15d
	movl	16(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, %rbx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_il4965_get_voltage_compensation
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_D_TXPOWER
	movl	24(%r14), %edi
	movq	_IL_TX_POWER_TEMPERATURE_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_max
	movl	24(%r14), %edi
	movq	_IL_TX_POWER_TEMPERATURE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, %edi
	callq	_KELVIN_TO_CELSIUS
	movl	%eax, %r14d
	movq	_tx_power_cmp_tble@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r12d, %ecx
	movl	(%rax,%rcx,8), %esi
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	movl	4(%rax,%rcx,8), %ecx
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	movq	-104(%rbp), %rax
	movq	(%rax), %r13
	movl	12(%r13), %r12d
	movl	%r14d, %edi
	subl	%r12d, %edi
	imull	%ecx, %edi
	leaq	-56(%rbp), %rdx
	callq	_il4965_math_div_round
	movl	16(%r13), %r15d
	movl	20(%r13), %ebx
	leaq	L_.str.4(%rip), %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_D_TXPOWER
	movl	-56(%rbp), %ecx
	leaq	L_.str.5(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_D_TXPOWER
	leaq	L_.str.6(%rip), %rdi
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	movl	%r15d, %esi
	movl	%ebx, -76(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_D_TXPOWER
	movq	-104(%rbp), %rax
	movq	8(%rax), %rbx
	movl	12(%rbx), %r13d
	movl	%r14d, %edi
	subl	%r13d, %edi
	imull	-88(%rbp), %edi                 ## 4-byte Folded Reload
	leaq	-52(%rbp), %rdx
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	callq	_il4965_math_div_round
	movl	16(%rbx), %r15d
	movl	20(%rbx), %r12d
	leaq	L_.str.4(%rip), %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_D_TXPOWER
	movl	-52(%rbp), %ecx
	leaq	L_.str.5(%rip), %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_D_TXPOWER
	leaq	L_.str.6(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_D_TXPOWER
	movq	_POWER_TBL_NUM_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movl	$0, %r12d
	jg	LBB0_20
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.27:
	movl	%r12d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
LBB0_20:
	movq	_back_off_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	subq	(%rax), %rdx
	movl	-92(%rbp), %r8d                 ## 4-byte Reload
	addl	%r8d, %r8d
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%edx, %ecx
	movl	%edx, %r15d
	cmovll	%ecx, %r15d
	cmpl	%r15d, %r8d
	cmovll	%r8d, %r15d
	leaq	L_.str.7(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_D_TXPOWER
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	addl	-76(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	-80(%rbp), %eax                 ## 4-byte Reload
	addl	-56(%rbp), %eax
	addl	%r15d, %eax
	subl	%eax, %ebx
	xorl	%edi, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_get_min_power_idx
	movq	%rbx, %rcx
	cmpl	%eax, %ebx
	jge	LBB0_22
## %bb.21:
	xorl	%edi, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_get_min_power_idx
	movl	%eax, %ecx
LBB0_22:
	leal	9(%rcx), %eax
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	cmovnel	%ecx, %eax
	movq	_POWER_TBL_CCK_ENTRY@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_24
## %bb.23:
	movq	_IL_TX_POWER_CCK_COMPENSATION_C_STEP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_24:
	addl	%eax, %r14d
	cmpl	$108, %r14d
	jl	LBB0_26
## %bb.25:
	leaq	L_.str.8(%rip), %rdi
	movl	%r14d, %esi
	callq	_IL_WARN
	movl	$107, %r14d
LBB0_26:
	leaq	L_.str.9(%rip), %rdi
	movl	%r14d, %esi
	callq	_IL_WARN
	ud2
	.cfi_endproc
                                        ## -- End function
	.comm	_CALIB_CH_GROUP_MAX,4,2         ## @CALIB_CH_GROUP_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chan %d band %d is_ht40 %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Can't find txatten group for channel %d.\n"

L_.str.2:                               ## @.str.2
	.asciz	"channel %d belongs to txatten group %d\n"

	.comm	_IL_TX_POWER_SATURATION_MIN,8,3 ## @IL_TX_POWER_SATURATION_MIN
	.comm	_IL_TX_POWER_SATURATION_MAX,8,3 ## @IL_TX_POWER_SATURATION_MAX
	.comm	_IL_TX_POWER_DEFAULT_SATURATION_24,8,3 ## @IL_TX_POWER_DEFAULT_SATURATION_24
	.comm	_IL_TX_POWER_DEFAULT_SATURATION_52,8,3 ## @IL_TX_POWER_DEFAULT_SATURATION_52
	.comm	_IL_TX_POWER_REGULATORY_MIN,4,2 ## @IL_TX_POWER_REGULATORY_MIN
	.comm	_IL_TX_POWER_REGULATORY_MAX,4,2 ## @IL_TX_POWER_REGULATORY_MAX
	.comm	_IL_TX_POWER_DEFAULT_REGULATORY_24,4,2 ## @IL_TX_POWER_DEFAULT_REGULATORY_24
	.comm	_IL_TX_POWER_DEFAULT_REGULATORY_52,4,2 ## @IL_TX_POWER_DEFAULT_REGULATORY_52
L_.str.3:                               ## @.str.3
	.asciz	"curr volt %d eeprom volt %d volt comp %d\n"

	.comm	_IL_TX_POWER_TEMPERATURE_MIN,4,2 ## @IL_TX_POWER_TEMPERATURE_MIN
	.comm	_IL_TX_POWER_TEMPERATURE_MAX,4,2 ## @IL_TX_POWER_TEMPERATURE_MAX
	.comm	_tx_power_cmp_tble,8,3          ## @tx_power_cmp_tble
L_.str.4:                               ## @.str.4
	.asciz	"chain = %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"fctry tmp %d, curr tmp %d, comp %d steps\n"

L_.str.6:                               ## @.str.6
	.asciz	"fctry idx %d, fctry pwr %d\n"

	.comm	_POWER_TBL_NUM_ENTRIES,4,2      ## @POWER_TBL_NUM_ENTRIES
	.comm	_IL_TX_POWER_MIMO_REGULATORY_COMPENSATION,4,2 ## @IL_TX_POWER_MIMO_REGULATORY_COMPENSATION
	.comm	_back_off_table,8,3             ## @back_off_table
L_.str.7:                               ## @.str.7
	.asciz	"rate %d sat %d reg %d usr %d tgt %d\n"

	.comm	_POWER_TBL_CCK_ENTRY,4,2        ## @POWER_TBL_CCK_ENTRY
	.comm	_IL_TX_POWER_CCK_COMPENSATION_C_STEP,8,3 ## @IL_TX_POWER_CCK_COMPENSATION_C_STEP
L_.str.8:                               ## @.str.8
	.asciz	"txpower idx %d > 107\n"

L_.str.9:                               ## @.str.9
	.asciz	"txpower idx %d < 0\n"

	.comm	_gain_table,8,3                 ## @gain_table
	.no_dead_strip	_il4965_fill_txpower_tbl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_fill_txpower_tbl
_il4965_fill_txpower_tbl:               ; @il4965_fill_txpower_tbl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x24, x4
	mov	x23, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	ldr	w26, [x0]
	stp	x1, x3, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	bl	_D_TXPOWER
	ldr	w1, [x22, #40]
	mov	x0, x22
	mov	x2, x21
	bl	_il_get_channel_info
	mov	x25, x0
	bl	_il_is_channel_valid
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x21
	bl	_il4965_get_tx_atten_grp
	mov	x20, x0
	tbnz	w0, #31, LBB0_6
; %bb.2:
	str	x20, [sp]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_D_TXPOWER
	add	w8, w21, #2
	sub	w9, w21, #2
	cmp	x24, #0
	csel	w8, w8, w9, eq
	cmp	x23, #0
	csel	w1, w21, w8, eq
	cmp	x23, #0
Lloh7:
	adrp	x8, _IL_TX_POWER_DEFAULT_SATURATION_52@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IL_TX_POWER_DEFAULT_SATURATION_52@GOTPAGEOFF]
	cset	w9, eq
Lloh9:
	adrp	x10, _IL_TX_POWER_DEFAULT_SATURATION_24@GOTPAGE
Lloh10:
	ldr	x10, [x10, _IL_TX_POWER_DEFAULT_SATURATION_24@GOTPAGEOFF]
	cmp	x19, #0
	csel	x8, x8, x10, eq
	cset	w10, eq
	ldr	x11, [x22, #32]
	ldr	x10, [x11, w10, uxtw #3]
Lloh11:
	adrp	x11, _IL_TX_POWER_SATURATION_MIN@GOTPAGE
Lloh12:
	ldr	x11, [x11, _IL_TX_POWER_SATURATION_MIN@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
Lloh14:
	adrp	x12, _IL_TX_POWER_SATURATION_MAX@GOTPAGE
Lloh15:
	ldr	x12, [x12, _IL_TX_POWER_SATURATION_MAX@GOTPAGEOFF]
Lloh16:
	ldr	x12, [x12]
	cmp	x10, x12
	ccmp	x10, x11, #8, le
	ldr	x8, [x8]
	csel	x8, x8, x10, lt
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	ldr	w8, [x25, w9, uxtw #2]
	lsl	w28, w8, #1
Lloh17:
	adrp	x8, _IL_TX_POWER_REGULATORY_MIN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IL_TX_POWER_REGULATORY_MIN@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _IL_TX_POWER_REGULATORY_MAX@GOTPAGE
Lloh21:
	ldr	x9, [x9, _IL_TX_POWER_REGULATORY_MAX@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w28, w8
	ccmp	w28, w9, #0, ge
	b.le	LBB0_9
; %bb.3:
	cbz	x19, LBB0_7
; %bb.4:
Lloh23:
	adrp	x8, _IL_TX_POWER_DEFAULT_REGULATORY_24@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IL_TX_POWER_DEFAULT_REGULATORY_24@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_6:
Lloh28:
	adrp	x0, l_.str.1@PAGE
Lloh29:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_IL_ERR
	b	LBB0_10
LBB0_7:
Lloh30:
	adrp	x8, _IL_TX_POWER_DEFAULT_REGULATORY_52@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IL_TX_POWER_DEFAULT_REGULATORY_52@GOTPAGEOFF]
LBB0_8:
	ldr	w28, [x8]
LBB0_9:
	str	w26, [sp, #68]                  ; 4-byte Folded Spill
	add	x2, sp, #72
	mov	x0, x22
	bl	_il4965_interpolate_chan
	ldr	x8, [x22, #32]
	ldr	w0, [x8, #16]
	bl	_le16_to_cpu
	mov	x23, x0
	ldr	w0, [x22, #16]
	bl	_le32_to_cpu
	mov	x24, x0
	mov	x0, x23
	mov	x1, x24
	bl	_il4965_get_voltage_compensation
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #48]                   ; 8-byte Folded Spill
	stp	x23, x0, [sp]
Lloh32:
	adrp	x0, l_.str.3@PAGE
Lloh33:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x24
	bl	_D_TXPOWER
	ldr	w0, [x22, #24]
Lloh34:
	adrp	x8, _IL_TX_POWER_TEMPERATURE_MIN@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IL_TX_POWER_TEMPERATURE_MIN@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	bl	_max
	ldr	w0, [x22, #24]
Lloh37:
	adrp	x8, _IL_TX_POWER_TEMPERATURE_MAX@GOTPAGE
Lloh38:
	ldr	x8, [x8, _IL_TX_POWER_TEMPERATURE_MAX@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_min
	bl	_KELVIN_TO_CELSIUS
	mov	x23, x0
Lloh40:
	adrp	x8, _tx_power_cmp_tble@GOTPAGE
Lloh41:
	ldr	x8, [x8, _tx_power_cmp_tble@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	add	x8, x8, w20, uxtw #3
	ldp	w20, w21, [x8]
	ldr	x8, [sp, #72]
	ldr	x25, [x8]
	ldr	w24, [x25, #12]
	sub	w8, w0, w24
	mul	w0, w8, w21
	add	x2, sp, #80
	mov	x1, x20
	bl	_il4965_math_div_round
	ldp	w22, w27, [x25, #16]
Lloh43:
	adrp	x25, l_.str.4@PAGE
Lloh44:
	add	x25, x25, l_.str.4@PAGEOFF
	mov	x0, x25
	mov	w1, #0
	bl	_D_TXPOWER
	ldr	w8, [sp, #80]
	stp	x23, x8, [sp]
Lloh45:
	adrp	x26, l_.str.5@PAGE
Lloh46:
	add	x26, x26, l_.str.5@PAGEOFF
	mov	x0, x26
	mov	x1, x24
	bl	_D_TXPOWER
	str	x27, [sp, #32]                  ; 8-byte Folded Spill
	str	x27, [sp]
Lloh47:
	adrp	x24, l_.str.6@PAGE
Lloh48:
	add	x24, x24, l_.str.6@PAGEOFF
	mov	x0, x24
	str	w22, [sp, #44]                  ; 4-byte Folded Spill
	mov	x1, x22
	bl	_D_TXPOWER
	ldr	x8, [sp, #72]
	ldr	x22, [x8, #8]
	ldr	w27, [x22, #12]
	sub	w8, w23, w27
	mul	w0, w8, w21
	add	x8, sp, #80
	add	x2, x8, #4
	mov	x1, x20
	bl	_il4965_math_div_round
	ldp	w20, w21, [x22, #16]
	mov	x0, x25
	mov	w1, #1
	bl	_D_TXPOWER
	ldr	w8, [sp, #84]
	stp	x23, x8, [sp]
	mov	x0, x26
	mov	x1, x27
	bl	_D_TXPOWER
	str	x21, [sp]
	mov	x0, x24
	mov	x1, x20
	bl	_D_TXPOWER
	mov	w20, #0
Lloh49:
	adrp	x8, _POWER_TBL_NUM_ENTRIES@GOTPAGE
Lloh50:
	ldr	x8, [x8, _POWER_TBL_NUM_ENTRIES@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ge	LBB0_13
LBB0_10:
	ldr	x8, [sp, #88]
Lloh52:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh53:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x20
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_12:
	bl	___stack_chk_fail
LBB0_13:
	ldr	w8, [sp, #68]                   ; 4-byte Folded Reload
	lsl	w8, w8, #1
Lloh55:
	adrp	x9, _back_off_table@GOTPAGE
Lloh56:
	ldr	x9, [x9, _back_off_table@GOTPAGEOFF]
Lloh57:
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x10, [sp, #56]                  ; 8-byte Folded Reload
	sub	x9, x10, x9
	cmp	w28, w9
	csel	w10, w28, w9, lt
	cmp	w8, w10
	csel	w20, w8, w10, lt
	stp	x9, x28, [sp]
	stp	x8, x20, [sp, #16]
Lloh58:
	adrp	x0, l_.str.7@PAGE
Lloh59:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	w1, #0
	bl	_D_TXPOWER
	ldr	w8, [sp, #80]
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	add	w8, w9, w8
	add	w8, w8, w20
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	ldr	x10, [sp, #32]                  ; 8-byte Folded Reload
	add	w9, w9, w10
	sub	w20, w9, w8
	mov	w0, #0
	mov	x1, x19
	bl	_get_min_power_idx
	cmp	w20, w0
	b.ge	LBB0_15
; %bb.14:
	mov	w0, #0
	mov	x1, x19
	bl	_get_min_power_idx
	mov	x20, x0
LBB0_15:
	add	w8, w20, #9
	cmp	x19, #0
	csel	w8, w8, w20, eq
Lloh60:
	adrp	x9, _POWER_TBL_CCK_ENTRY@GOTPAGE
Lloh61:
	ldr	x9, [x9, _POWER_TBL_CCK_ENTRY@GOTPAGEOFF]
Lloh62:
	adrp	x10, _IL_TX_POWER_CCK_COMPENSATION_C_STEP@GOTPAGE
Lloh63:
	ldr	x10, [x10, _IL_TX_POWER_CCK_COMPENSATION_C_STEP@GOTPAGEOFF]
Lloh64:
	ldr	w9, [x9]
Lloh65:
	ldr	w10, [x10]
	cmp	w9, #0
	csel	w9, w10, wzr, eq
	add	w1, w9, w8
	cmp	w1, #108
	b.lt	LBB0_17
; %bb.16:
Lloh66:
	adrp	x0, l_.str.8@PAGE
Lloh67:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_IL_WARN
	mov	w1, #107
LBB0_17:
Lloh68:
	adrp	x0, l_.str.9@PAGE
Lloh69:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_IL_WARN
	brk	#0x1
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh64
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpAdd	Lloh68, Lloh69
	.cfi_endproc
                                        ; -- End function
	.comm	_CALIB_CH_GROUP_MAX,4,2         ; @CALIB_CH_GROUP_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chan %d band %d is_ht40 %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Can't find txatten group for channel %d.\n"

l_.str.2:                               ; @.str.2
	.asciz	"channel %d belongs to txatten group %d\n"

	.comm	_IL_TX_POWER_SATURATION_MIN,8,3 ; @IL_TX_POWER_SATURATION_MIN
	.comm	_IL_TX_POWER_SATURATION_MAX,8,3 ; @IL_TX_POWER_SATURATION_MAX
	.comm	_IL_TX_POWER_DEFAULT_SATURATION_24,8,3 ; @IL_TX_POWER_DEFAULT_SATURATION_24
	.comm	_IL_TX_POWER_DEFAULT_SATURATION_52,8,3 ; @IL_TX_POWER_DEFAULT_SATURATION_52
	.comm	_IL_TX_POWER_REGULATORY_MIN,4,2 ; @IL_TX_POWER_REGULATORY_MIN
	.comm	_IL_TX_POWER_REGULATORY_MAX,4,2 ; @IL_TX_POWER_REGULATORY_MAX
	.comm	_IL_TX_POWER_DEFAULT_REGULATORY_24,4,2 ; @IL_TX_POWER_DEFAULT_REGULATORY_24
	.comm	_IL_TX_POWER_DEFAULT_REGULATORY_52,4,2 ; @IL_TX_POWER_DEFAULT_REGULATORY_52
l_.str.3:                               ; @.str.3
	.asciz	"curr volt %d eeprom volt %d volt comp %d\n"

	.comm	_IL_TX_POWER_TEMPERATURE_MIN,4,2 ; @IL_TX_POWER_TEMPERATURE_MIN
	.comm	_IL_TX_POWER_TEMPERATURE_MAX,4,2 ; @IL_TX_POWER_TEMPERATURE_MAX
	.comm	_tx_power_cmp_tble,8,3          ; @tx_power_cmp_tble
l_.str.4:                               ; @.str.4
	.asciz	"chain = %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"fctry tmp %d, curr tmp %d, comp %d steps\n"

l_.str.6:                               ; @.str.6
	.asciz	"fctry idx %d, fctry pwr %d\n"

	.comm	_POWER_TBL_NUM_ENTRIES,4,2      ; @POWER_TBL_NUM_ENTRIES
	.comm	_IL_TX_POWER_MIMO_REGULATORY_COMPENSATION,4,2 ; @IL_TX_POWER_MIMO_REGULATORY_COMPENSATION
	.comm	_back_off_table,8,3             ; @back_off_table
l_.str.7:                               ; @.str.7
	.asciz	"rate %d sat %d reg %d usr %d tgt %d\n"

	.comm	_POWER_TBL_CCK_ENTRY,4,2        ; @POWER_TBL_CCK_ENTRY
	.comm	_IL_TX_POWER_CCK_COMPENSATION_C_STEP,8,3 ; @IL_TX_POWER_CCK_COMPENSATION_C_STEP
l_.str.8:                               ; @.str.8
	.asciz	"txpower idx %d > 107\n"

l_.str.9:                               ; @.str.9
	.asciz	"txpower idx %d < 0\n"

	.comm	_gain_table,8,3                 ; @gain_table
	.no_dead_strip	_il4965_fill_txpower_tbl
.subsections_via_symbols
