	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_setup_channel_powertable
_ath5k_setup_channel_powertable:        ## @ath5k_setup_channel_powertable
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	%rsp, -120(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	48(%rdi), %rax
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -208(%rbp)                ## 8-byte Spill
	movq	_AR5K_EEPROM_N_PD_GAINS@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movl	(%r14), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movl	(%r15), %eax
	movl	%eax, -108(%rbp)                ## 4-byte Spill
	leaq	-104(%rbp), %rdx
	leaq	-96(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ath5k_get_chan_pcal_surrounding_piers
	movq	56(%r12), %rax
	movq	%rbx, -136(%rbp)                ## 8-byte Spill
	cmpl	$0, (%rax,%rbx,4)
	jle	LBB0_17
## %bb.1:
	xorl	%edx, %edx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$-128, %rax
	movq	%rax, -200(%rbp)                ## 8-byte Spill
	movq	%r12, -168(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	incq	%rdx
	movq	-168(%rbp), %r12                ## 8-byte Reload
	movq	56(%r12), %rax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movslq	(%rax,%rcx,4), %rax
	cmpq	%rax, %rdx
	jge	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	-208(%rbp), %rax                ## 8-byte Reload
	movq	(%rax,%rdx,8), %r13
	movq	-104(%rbp), %rax
	movq	16(%rax), %r15
	movq	-96(%rbp), %rax
	movq	16(%rax), %rbx
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rax,%rdx,8), %r14
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rax
	movq	%rax, -192(%rbp)                ## 8-byte Spill
	shlq	$4, %r13
	leaq	(%r15,%r13), %rax
	addq	$8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r13), %rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movq	8(%r15,%r13), %rax
	movl	(%rax), %edi
	leaq	8(%rbx,%r13), %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	leaq	(%rbx,%r13), %rax
	movq	%rax, -184(%rbp)                ## 8-byte Spill
	movq	8(%rbx,%r13), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, %r12d
	shrl	$31, %r12d
	addl	%eax, %r12d
	sarl	%r12d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%r12d, (%rax,%rcx,4)
	movq	8(%r15,%r13), %rax
	movslq	(%r15,%r13), %rcx
	movl	-4(%rax,%rcx,4), %edi
	movq	8(%rbx,%r13), %rax
	movq	%rbx, -176(%rbp)                ## 8-byte Spill
	movslq	(%rbx,%r13), %rcx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	-4(%rax,%rcx,4), %esi
	callq	_max
	movq	%rbx, %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax,%rdx,4)
	cmpq	$2, -200(%rbp)                  ## 8-byte Folded Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jae	LBB0_3
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rcx), %rdx
	movl	4(%r15,%r13), %ecx
	movl	(%rsi), %r8d
	subq	$8, %rsp
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	%r14, %r9
	pushq	%rax
	callq	_ath5k_create_power_curve
	addq	$16, %rsp
	movq	-104(%rbp), %rax
	cmpq	-96(%rbp), %rax
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdx
	movq	-176(%rbp), %rax                ## 8-byte Reload
	movl	4(%rax,%r13), %ecx
	movq	-184(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %r8d
	subq	$8, %rsp
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	-192(%rbp), %r9                 ## 8-byte Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_ath5k_create_power_curve
	addq	$16, %rsp
	subl	%r12d, %ebx
	jle	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_AR5K_EEPROM_POWER_TABLE_SIZE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %r15
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-104(%rbp), %rax
	movl	8(%rax), %esi
	movq	-96(%rbp), %rax
	movl	8(%rax), %edx
	movl	-8(%r14,%rbx,8), %ecx
	movq	-192(%rbp), %rax                ## 8-byte Reload
	movl	-8(%rax,%rbx,8), %r8d
	movl	-108(%rbp), %edi                ## 4-byte Reload
	callq	_ath5k_get_interpolated_value
	movq	%rax, -8(%r14,%rbx,8)
	cmpq	%r15, %rbx
	jge	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	leaq	1(%rbx), %rax
	movq	_AR5K_EEPROM_POWER_TABLE_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rbx
	movq	%rax, %rbx
	jl	LBB0_14
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	cmpq	$130, %rax
	jne	LBB0_28
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, %rbx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	-152(%rbp), %r12                ## 8-byte Reload
	movq	(%r12), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, %ecx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, -156(%rbp)                ## 4-byte Spill
	movl	%ecx, (%rax,%rbx,4)
	movq	(%r15), %rax
	movq	-144(%rbp), %r15                ## 8-byte Reload
	movslq	(%r15), %rcx
	movl	-4(%rax,%rcx,4), %edi
	movq	(%r12), %rax
	movq	%rbx, %r12
	movq	-184(%rbp), %rcx                ## 8-byte Reload
	movslq	(%rcx), %rcx
	movl	-4(%rax,%rcx,4), %esi
	callq	_max
	movl	%eax, %ebx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax,%r12,4)
	movq	-168(%rbp), %rax                ## 8-byte Reload
	movq	56(%rax), %rax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	cmpl	$2, (%rax,%rcx,4)
	jl	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%r12, %r12
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	-128(%rbp), %r15                ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	-156(%rbp), %r12d               ## 4-byte Reload
	jmp	LBB0_10
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	4(%rax,%r13), %edi
	movq	-176(%rbp), %rax                ## 8-byte Reload
	movl	4(%rax,%r13), %esi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rcx
	callq	_ath5k_get_linear_pcdac_min
	movq	%r12, %rdx
	movl	%eax, %r12d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%rdx,4)
	movl	%ebx, %eax
	subl	%r12d, %eax
	cmpl	$127, %eax
	jl	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r12d
	addl	$-126, %r12d
	movl	%r12d, (%rcx,%rdx,4)
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-128(%rbp), %r15                ## 8-byte Reload
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_17:
	movq	-104(%rbp), %rax
	movl	(%rax), %ecx
	movl	8(%rax), %esi
	movq	-96(%rbp), %rax
	movl	(%rax), %r8d
	movl	8(%rax), %edx
	movl	-108(%rbp), %r14d               ## 4-byte Reload
	movl	%r14d, %edi
	callq	_ath5k_get_interpolated_value
	movq	%rax, 40(%r12)
	movq	-104(%rbp), %rax
	movl	4(%rax), %ecx
	movl	8(%rax), %esi
	movq	-96(%rbp), %rax
	movl	4(%rax), %r8d
	movl	8(%rax), %edx
	movl	%r14d, %edi
	callq	_ath5k_get_interpolated_value
	movq	%rax, 32(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$128, %rax
	je	LBB0_21
## %bb.18:
	cmpq	$129, %rax
	je	LBB0_23
## %bb.19:
	cmpq	$130, %rax
	movq	-120(%rbp), %r14                ## 8-byte Reload
	jne	LBB0_22
## %bb.20:
	movq	56(%r12), %rax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movl	(%rax,%rcx,4), %ecx
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_ath5k_combine_linear_pcdac_curves
	movl	(%r15), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	$64, %eax
	subl	%ecx, %eax
	jmp	LBB0_25
LBB0_21:
	movq	56(%r12), %rax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movl	(%rax,%rcx,4), %ecx
	movq	%r12, %rdi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_ath5k_combine_pwr_to_pdadc_curves
	movl	(%r14), %eax
	jmp	LBB0_24
LBB0_23:
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_ath5k_fill_pwr_to_pcdac_table
	movl	$0, 24(%r12)
	xorl	%eax, %eax
LBB0_24:
	movq	-120(%rbp), %r14                ## 8-byte Reload
LBB0_25:
	movl	%eax, 16(%r12)
	movl	$1, 20(%r12)
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_22:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_26
LBB0_28:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movq	-120(%rbp), %r14                ## 8-byte Reload
LBB0_26:
	movq	%r14, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_29
## %bb.27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_EEPROM_N_PD_GAINS,4,2     ## @AR5K_EEPROM_N_PD_GAINS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AR5K_EEPROM_POWER_TABLE_SIZE,4,2 ## @AR5K_EEPROM_POWER_TABLE_SIZE
	.no_dead_strip	_ath5k_setup_channel_powertable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_setup_channel_powertable
_ath5k_setup_channel_powertable:        ; @ath5k_setup_channel_powertable
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #144
	stur	x3, [x29, #-128]                ; 8-byte Folded Spill
	mov	x19, x2
	mov	x23, x0
	mov	x8, sp
	stur	x8, [x29, #-216]                ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0, #48]
	ldr	x8, [x8, x2, lsl #3]
	stur	x8, [x29, #-184]                ; 8-byte Folded Spill
Lloh3:
	adrp	x12, _AR5K_EEPROM_N_PD_GAINS@GOTPAGE
Lloh4:
	ldr	x12, [x12, _AR5K_EEPROM_N_PD_GAINS@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x8, x9, x8
	stur	x8, [x29, #-160]                ; 8-byte Folded Spill
	mov	sp, x8
	ldr	w8, [x12]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x8, x9, x8
	stur	x8, [x29, #-168]                ; 8-byte Folded Spill
	mov	sp, x8
	ldr	w24, [x1]
	sub	x2, x29, #96
	sub	x3, x29, #104
	bl	_ath5k_get_chan_pcal_surrounding_piers
	ldr	x8, [x23, #56]
	stur	x19, [x29, #-176]               ; 8-byte Folded Spill
	ldr	w8, [x8, x19, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x20, #0
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	sub	x8, x8, #128
	stp	x23, x8, [x29, #-200]           ; 16-byte Folded Spill
	stur	w24, [x29, #-204]               ; 4-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	ldr	x8, [x23, #56]
	ldur	x9, [x29, #-176]                ; 8-byte Folded Reload
	ldrsw	x8, [x8, x9, lsl #2]
	cmp	x20, x8
	b.ge	LBB0_16
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	lsl	x8, x20, #3
	ldur	x9, [x29, #-184]                ; 8-byte Folded Reload
	ldr	x12, [x9, x8]
	ldur	x9, [x29, #-96]
	ldr	x13, [x9, #16]
	ldur	x9, [x29, #-104]
	ldp	x10, x11, [x23]
	ldr	x25, [x10, x8]
	ldr	x26, [x11, x8]
	ldr	x9, [x9, #16]
	stur	x12, [x29, #-136]               ; 8-byte Folded Spill
	lsl	x24, x12, #4
	stur	x13, [x29, #-120]               ; 8-byte Folded Spill
	add	x21, x13, x24
	mov	x19, x21
	ldr	x8, [x19, #8]!
	ldr	w0, [x8]
	stur	x9, [x29, #-152]                ; 8-byte Folded Spill
	add	x22, x9, x24
	mov	x28, x22
	ldr	x8, [x28, #8]!
	ldr	w1, [x8]
	bl	_min
	cmp	w0, #0
	cinc	w8, w0, lt
	asr	w27, w8, #1
	lsl	x23, x20, #2
	ldur	x8, [x29, #-160]                ; 8-byte Folded Reload
	str	w27, [x8, x23]
	ldr	x8, [x19]
	stur	x21, [x29, #-112]               ; 8-byte Folded Spill
	ldrsw	x9, [x21]
	mov	x21, x28
	add	x8, x8, x9, lsl #2
	ldur	w0, [x8, #-4]
	ldr	x8, [x28]
	stur	x22, [x29, #-144]               ; 8-byte Folded Spill
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #2
	ldur	w1, [x8, #-4]
	bl	_max
	cmp	w0, #0
	cinc	w8, w0, lt
	asr	w28, w8, #1
	ldur	x8, [x29, #-168]                ; 8-byte Folded Reload
	str	w28, [x8, x23]
	ldur	x8, [x29, #-192]                ; 8-byte Folded Reload
	cmp	x8, #2
	b.hs	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x23, [x29, #-200]               ; 8-byte Folded Reload
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	x22, x6, [x29, #-136]           ; 16-byte Folded Reload
	ldur	w24, [x29, #-204]               ; 4-byte Folded Reload
	ldr	x2, [x19]
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	add	x8, x8, x22, lsl #4
	ldr	w3, [x8, #4]
	ldur	x8, [x29, #-112]                ; 8-byte Folded Reload
	ldr	w4, [x8]
	mov	x0, x27
	mov	x1, x28
	mov	x5, x25
	bl	_ath5k_create_power_curve
	ldp	x9, x8, [x29, #-104]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x2, [x21]
	ldur	x8, [x29, #-152]                ; 8-byte Folded Reload
	add	x8, x8, x22, lsl #4
	ldr	w3, [x8, #4]
	ldur	x8, [x29, #-144]                ; 8-byte Folded Reload
	ldr	w4, [x8]
	mov	x0, x27
	mov	x1, x28
	mov	x5, x26
	ldur	x6, [x29, #-128]                ; 8-byte Folded Reload
	bl	_ath5k_create_power_curve
Lloh9:
	adrp	x8, _AR5K_EEPROM_POWER_TABLE_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR5K_EEPROM_POWER_TABLE_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x8]
	subs	w8, w28, w27
	ccmp	w9, #1, #8, gt
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, #0
	sxtw	x21, w8
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	x8, [x29, #-96]
	ldr	w1, [x8, #8]
	ldur	x8, [x29, #-104]
	ldr	w2, [x8, #8]
	lsl	x22, x19, #3
	ldr	w3, [x25, x22]
	ldr	w4, [x26, x22]
	mov	x0, x24
	bl	_ath5k_get_interpolated_value
	str	x0, [x25, x22]
	add	x19, x19, #1
	cmp	x19, x21
	b.ge	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
Lloh12:
	adrp	x8, _AR5K_EEPROM_POWER_TABLE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR5K_EEPROM_POWER_TABLE_SIZE@GOTPAGEOFF]
Lloh14:
	ldrsw	x8, [x8]
	cmp	x19, x8
	b.lt	LBB0_8
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	cmp	x8, #130
	b.ne	LBB0_25
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	x8, [x21]
	ldr	w1, [x8]
	bl	_min
	mov	x27, x0
	ldur	x8, [x29, #-160]                ; 8-byte Folded Reload
	str	w0, [x8, x23]
	ldr	x8, [x19]
	ldur	x9, [x29, #-112]                ; 8-byte Folded Reload
	ldrsw	x9, [x9]
	add	x8, x8, x9, lsl #2
	ldur	w0, [x8, #-4]
	ldr	x8, [x21]
	ldur	x9, [x29, #-144]                ; 8-byte Folded Reload
	ldrsw	x9, [x9]
	add	x8, x8, x9, lsl #2
	ldur	w1, [x8, #-4]
	bl	_max
	mov	x28, x0
	ldp	x9, x8, [x29, #-176]            ; 16-byte Folded Reload
	str	w0, [x8, x23]
	ldur	x23, [x29, #-200]               ; 8-byte Folded Reload
	ldr	x8, [x23, #56]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	cbz	x20, LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	add	x8, x8, x24
	ldr	w0, [x8, #4]
	ldur	x8, [x29, #-152]                ; 8-byte Folded Reload
	add	x8, x8, x24
	ldr	w1, [x8, #4]
	ldr	x2, [x19]
	ldr	x3, [x21]
	bl	_ath5k_get_linear_pcdac_min
	ldur	x9, [x29, #-160]                ; 8-byte Folded Reload
	str	w0, [x9, x20, lsl #2]
	sub	w8, w28, w0
	cmp	w8, #127
	b.lt	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	w27, w28, #126
	str	w27, [x9, x20, lsl #2]
	b	LBB0_5
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, x0
	b	LBB0_5
LBB0_16:
	ldp	x9, x8, [x29, #-104]
	ldr	w1, [x8, #8]
	ldr	w2, [x9, #8]
	ldr	w3, [x8]
	ldr	w4, [x9]
	mov	x0, x24
	bl	_ath5k_get_interpolated_value
	str	x0, [x23, #40]
	ldp	x9, x8, [x29, #-104]
	ldp	w3, w1, [x8, #4]
	ldp	w4, w2, [x9, #4]
	mov	x0, x24
	bl	_ath5k_get_interpolated_value
	str	x0, [x23, #32]
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	cmp	x8, #128
	b.eq	LBB0_20
; %bb.17:
	cmp	x8, #129
	b.eq	LBB0_21
; %bb.18:
	cmp	x8, #130
	ldur	x19, [x29, #-216]               ; 8-byte Folded Reload
	b.ne	LBB0_24
; %bb.19:
	ldr	x8, [x23, #56]
	ldp	x9, x20, [x29, #-176]           ; 16-byte Folded Reload
	ldr	w3, [x8, x9, lsl #2]
	mov	x0, x23
	ldur	x1, [x29, #-160]                ; 8-byte Folded Reload
	mov	x2, x20
	bl	_ath5k_combine_linear_pcdac_curves
	ldr	w8, [x20]
	cmp	w8, #0
	cinc	w8, w8, lt
	mov	w9, #64
	sub	w8, w9, w8, asr #1
	b	LBB0_23
LBB0_20:
	ldr	x8, [x23, #56]
	ldp	x9, x2, [x29, #-176]            ; 16-byte Folded Reload
	ldr	w3, [x8, x9, lsl #2]
	mov	x0, x23
	ldur	x19, [x29, #-160]               ; 8-byte Folded Reload
	mov	x1, x19
	bl	_ath5k_combine_pwr_to_pdadc_curves
	ldr	w8, [x19]
	b	LBB0_22
LBB0_21:
	mov	x0, x23
	ldp	x2, x1, [x29, #-168]            ; 16-byte Folded Reload
	bl	_ath5k_fill_pwr_to_pcdac_table
	mov	w8, #0
	str	wzr, [x23, #24]
LBB0_22:
	ldur	x19, [x29, #-216]               ; 8-byte Folded Reload
LBB0_23:
	mov	w0, #0
	mov	w9, #1
	stp	w8, w9, [x23, #16]
	b	LBB0_26
LBB0_24:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_26
LBB0_25:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	ldur	x19, [x29, #-216]               ; 8-byte Folded Reload
LBB0_26:
	mov	sp, x19
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_EEPROM_N_PD_GAINS,4,2     ; @AR5K_EEPROM_N_PD_GAINS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AR5K_EEPROM_POWER_TABLE_SIZE,4,2 ; @AR5K_EEPROM_POWER_TABLE_SIZE
	.no_dead_strip	_ath5k_setup_channel_powertable
.subsections_via_symbols
