	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlc_lcnphy_load_rfpower
_wlc_lcnphy_load_rfpower:               ## @wlc_lcnphy_load_rfpower
	.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	%rdi, %r15
	movq	_LCNPHY_TBL_ID_TXPWRCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movabsq	$4294967328, %rax               ## imm = 0x100000020
	movq	%rax, -120(%rbp)
	xorl	%r13d, %r13d
	leaq	-120(%rbp), %r14
	leaq	-88(%rbp), %r12
	leaq	-80(%rbp), %rbx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rdi
	movq	%rax, %rsi
	callq	_qm_shr16
	movq	%rax, %rdi
	movq	%rax, -64(%rbp)
	movq	-56(%rbp), %rsi
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %r12
	callq	_qm_sub16
	movb	$4, %cl
	subb	%r12b, %cl
	leal	-4(%r12), %edx
	cmpq	$4, %r12
	movzbl	%cl, %ecx
	movzbl	%dl, %edx
	cmovll	%ecx, %edx
	movl	%r13d, %esi
	movl	%edx, %ecx
	shll	%cl, %esi
	movslq	%esi, %rsi
	leaq	(%rax,%rax,4), %rax
	leal	-2(%rdx), %ecx
	movl	$1, %edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	addq	%rsi, %rax
	movslq	%edi, %rsi
	addq	%rax, %rsi
	decb	%dl
	movl	%edx, %ecx
	sarq	%cl, %rsi
	movl	%esi, -68(%rbp)
	leaq	-68(%rbp), %rax
	movq	%rax, -112(%rbp)
	movq	_LCNPHY_TX_PWR_CTRL_PWR_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r13, %rax
	movq	%rax, -104(%rbp)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_wlc_lcnphy_write_table
	incq	%r13
	cmpq	$128, %r13
	leaq	-88(%rbp), %r12
	leaq	-80(%rbp), %rbx
	je	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-44(%rbp), %rax
	movq	%rax, -112(%rbp)
	movq	_LCNPHY_TX_PWR_CTRL_IQ_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r13, %rax
	movq	%rax, -104(%rbp)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_wlc_lcnphy_read_table
	sarl	$20, -44(%rbp)
	leaq	-124(%rbp), %rax
	movq	%rax, -112(%rbp)
	movq	_LCNPHY_TX_PWR_CTRL_GAIN_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r13, %rax
	movq	%rax, -104(%rbp)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_wlc_lcnphy_read_table
	movl	-44(%rbp), %edi
	xorl	%esi, %esi
	leaq	-64(%rbp), %rdx
	movq	%r12, %rcx
	callq	_qm_log10
	movl	$64, %edi
	xorl	%esi, %esi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rcx
	callq	_qm_log10
	movq	-88(%rbp), %rcx
	movq	-80(%rbp), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	jge	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdi
	subq	%rcx, %rsi
	callq	_qm_shr16
	movq	%rax, %rsi
	movq	%rax, -56(%rbp)
	movq	-64(%rbp), %rdi
	movq	%r12, %rbx
	jmp	LBB0_4
LBB0_5:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LCNPHY_TBL_ID_TXPWRCTL,4,2     ## @LCNPHY_TBL_ID_TXPWRCTL
	.comm	_LCNPHY_TX_PWR_CTRL_IQ_OFFSET,8,3 ## @LCNPHY_TX_PWR_CTRL_IQ_OFFSET
	.comm	_LCNPHY_TX_PWR_CTRL_GAIN_OFFSET,8,3 ## @LCNPHY_TX_PWR_CTRL_GAIN_OFFSET
	.comm	_LCNPHY_TX_PWR_CTRL_PWR_OFFSET,8,3 ## @LCNPHY_TX_PWR_CTRL_PWR_OFFSET
	.no_dead_strip	_wlc_lcnphy_load_rfpower
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function wlc_lcnphy_load_rfpower
lCPI0_0:
	.long	32                              ; 0x20
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_wlc_lcnphy_load_rfpower:               ; @wlc_lcnphy_load_rfpower
	.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
	mov	x20, #0
Lloh0:
	adrp	x8, _LCNPHY_TBL_ID_TXPWRCTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LCNPHY_TBL_ID_TXPWRCTL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #72]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #48]
Lloh5:
	adrp	x22, _LCNPHY_TX_PWR_CTRL_IQ_OFFSET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _LCNPHY_TX_PWR_CTRL_IQ_OFFSET@GOTPAGEOFF]
Lloh7:
	adrp	x23, _LCNPHY_TX_PWR_CTRL_GAIN_OFFSET@GOTPAGE
Lloh8:
	ldr	x23, [x23, _LCNPHY_TX_PWR_CTRL_GAIN_OFFSET@GOTPAGEOFF]
	add	x24, sp, #36
	mov	w25, #4
	mov	w26, #1
	add	x27, sp, #44
Lloh9:
	adrp	x28, _LCNPHY_TX_PWR_CTRL_PWR_OFFSET@GOTPAGE
Lloh10:
	ldr	x28, [x28, _LCNPHY_TX_PWR_CTRL_PWR_OFFSET@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [sp, #24]
	bl	_qm_shr16
	str	x0, [sp, #24]
	mov	x8, sp
	ldr	x1, [sp, #16]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x21, [x8]
	bl	_qm_sub16
	sub	x8, x21, #4
	sub	x9, x25, x21
	cmp	x21, #3
	csel	x8, x8, x9, gt
	lsl	w9, w20, w8
	add	x10, x0, x0, lsl #2
	add	x9, x10, w9, sxtw
	sub	w10, w8, #2
	lsl	w10, w26, w10
	add	x9, x9, w10, sxtw
	sub	x8, x8, #1
	asr	x8, x9, x8
	str	w8, [sp, #44]
	ldr	x8, [x28]
	add	x8, x20, x8
	stp	x27, x8, [sp, #56]
	add	x1, sp, #48
	mov	x0, x19
	bl	_wlc_lcnphy_write_table
	add	x20, x20, #1
	cmp	x20, #128
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x8, x20, x8
	add	x9, sp, #40
	stp	x9, x8, [sp, #56]
	add	x1, sp, #48
	mov	x0, x19
	bl	_wlc_lcnphy_read_table
	ldr	w8, [sp, #40]
	asr	w8, w8, #20
	str	w8, [sp, #40]
	ldr	x8, [x23]
	add	x8, x20, x8
	stp	x24, x8, [sp, #56]
	add	x1, sp, #48
	mov	x0, x19
	bl	_wlc_lcnphy_read_table
	ldr	w0, [sp, #40]
	add	x2, sp, #24
	add	x3, sp, #8
	mov	w1, #0
	bl	_qm_log10
	add	x2, sp, #16
	mov	x3, sp
	mov	w0, #64
	mov	w1, #0
	bl	_qm_log10
	ldp	x9, x8, [sp]
	subs	x1, x8, x9
	b.ge	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [sp, #16]
	sub	x1, x9, x8
	bl	_qm_shr16
	mov	x1, x0
	str	x0, [sp, #16]
	add	x8, sp, #8
	ldr	x0, [sp, #24]
	b	LBB0_2
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LCNPHY_TBL_ID_TXPWRCTL,4,2     ; @LCNPHY_TBL_ID_TXPWRCTL
	.comm	_LCNPHY_TX_PWR_CTRL_IQ_OFFSET,8,3 ; @LCNPHY_TX_PWR_CTRL_IQ_OFFSET
	.comm	_LCNPHY_TX_PWR_CTRL_GAIN_OFFSET,8,3 ; @LCNPHY_TX_PWR_CTRL_GAIN_OFFSET
	.comm	_LCNPHY_TX_PWR_CTRL_PWR_OFFSET,8,3 ; @LCNPHY_TX_PWR_CTRL_PWR_OFFSET
	.no_dead_strip	_wlc_lcnphy_load_rfpower
.subsections_via_symbols
