	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_create_power_curve
_ath5k_create_power_curve:              ## @ath5k_create_power_curve
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	cmpl	$2, %r8d
	jl	LBB0_6
## %bb.1:
	movq	%rdx, %r13
	movl	%edi, %ebx
	movl	16(%rbp), %ecx
	movq	_AR5K_PWRTABLE_LINEAR_PCDAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subl	%edi, %esi
	cmpl	%ecx, %edx
	movl	$63, %eax
	cmovnel	%esi, %eax
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movq	_AR5K_EEPROM_POWER_TABLE_SIZE@GOTPCREL(%rip), %rsi
	cmpl	$0, (%rsi)
	jle	LBB0_6
## %bb.3:
	cmpl	%ecx, %edx
	setne	%cl
	shll	%cl, %ebx
	decl	-44(%rbp)                       ## 4-byte Folded Spill
	movl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %r15d
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %eax
	cmpl	(%r13,%rax,4), %ebx
	setg	%al
	cmpl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	setl	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
	addl	%eax, %r15d
	addl	%eax, %r12d
	movl	(%r13,%r12,4), %esi
	movl	(%r13,%r15,4), %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r12,4), %ecx
	movl	(%rax,%r15,4), %r8d
	movl	%ebx, %edi
	callq	_ath5k_get_interpolated_value
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14,4)
	cmpq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	jae	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	$2, %ebx
	incq	%r14
	movq	_AR5K_EEPROM_POWER_TABLE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r14
	jl	LBB0_4
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_PWRTABLE_LINEAR_PCDAC,4,2 ## @AR5K_PWRTABLE_LINEAR_PCDAC
	.comm	_AR5K_EEPROM_POWER_TABLE_SIZE,4,2 ## @AR5K_EEPROM_POWER_TABLE_SIZE
	.no_dead_strip	_ath5k_create_power_curve
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_create_power_curve
_ath5k_create_power_curve:              ; @ath5k_create_power_curve
	.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
	cmp	w4, #2
	b.lt	LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _AR5K_PWRTABLE_LINEAR_PCDAC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR5K_PWRTABLE_LINEAR_PCDAC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w1, w0
	mov	w10, #63
	cmp	w8, w6
	csel	w23, w10, w9, eq
	tbnz	w23, #31, LBB0_6
; %bb.2:
Lloh3:
	adrp	x24, _AR5K_EEPROM_POWER_TABLE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _AR5K_EEPROM_POWER_TABLE_SIZE@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x19, x5
	mov	x20, x3
	mov	x21, x2
	mov	x25, #0
	mov	w26, #0
	cmp	w8, w6
	cset	w8, ne
	lsl	w22, w0, w8
	sub	w27, w4, #1
	mov	w28, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, w28, uxtw #2]
	cmp	w22, w8
	ccmp	w28, w27, #0, gt
	cinc	w28, w28, lt
	cinc	w26, w26, lt
	lsl	x8, x26, #2
	ldr	w1, [x21, x8]
	lsl	x9, x28, #2
	ldr	w2, [x21, x9]
	ldr	w3, [x20, x8]
	ldr	w4, [x20, x9]
	mov	x0, x22
	bl	_ath5k_get_interpolated_value
	str	w0, [x19, x25, lsl #2]
	cmp	x25, x23
	b.hs	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #2
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.lt	LBB0_4
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_PWRTABLE_LINEAR_PCDAC,4,2 ; @AR5K_PWRTABLE_LINEAR_PCDAC
	.comm	_AR5K_EEPROM_POWER_TABLE_SIZE,4,2 ; @AR5K_EEPROM_POWER_TABLE_SIZE
	.no_dead_strip	_ath5k_create_power_curve
.subsections_via_symbols
