	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlc_lcnphy_rx_signal_power     ## -- Begin function wlc_lcnphy_rx_signal_power
	.p2align	4, 0x90
_wlc_lcnphy_rx_signal_power:            ## @wlc_lcnphy_rx_signal_power
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	%rsi, -48(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rsi
	callq	_wlc_lcnphy_get_receive_power
	movq	%rax, %rbx
	movq	_lcnphy_gain_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	$1061, %esi                     ## imm = 0x425
	callq	_read_phy_reg
	sarl	$8, %eax
	shll	$4, %ebx
	bsfl	%ebx, %edx
	movl	$-1, %esi
	cmovel	%esi, %edx
	leal	1(%rdx), %r15d
	movl	%edx, %ecx
	shll	%cl, %esi
	movl	$1, %edi
	movl	%r15d, %ecx
	shll	%cl, %edi
	movslq	%eax, %r12
	addl	%ebx, %esi
	subl	%ebx, %edi
	cmpl	%edi, %esi
	movslq	%edx, %rax
	cmovlq	%rax, %r15
	shrq	%r12
	movq	%r14, %rdi
	movl	$1076, %esi                     ## imm = 0x434
	callq	_read_phy_reg
	movzbl	%al, %eax
	leaq	-256(%rax), %rbx
	cmpl	$127, %eax
	cmovbeq	%rax, %rbx
	leaq	(%r15,%r15,2), %r13
	movq	_lcnphy_gain_index_offset_for_rssi@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx
	movq	(%rax,%rcx,8), %r15
	movl	(%r14), %edi
	callq	_CHSPEC_CHANNEL
	movl	%eax, %edi
	callq	_wlc_phy_channel2freq
	addl	$-2428, %eax                    ## imm = 0xF684
	addq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	subq	%r12, %r15
	addq	%rbx, %r15
	addq	%r13, %r15
	cmpl	$40, %eax
	sbbq	$0, %r15
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	imulq	$286, %rax, %rcx                ## imm = 0x11E
	addq	$-15, %rax
	addq	$-10010, %rcx                   ## imm = 0xD8E6
	shrq	$12, %rcx
	leaq	-7(%rcx), %rbx
	cmpq	$-30, %rax
	cmovaeq	%rcx, %rbx
	addq	%r15, %rbx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_wlc_lcnphy_rx_gain_override_enable
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lcnphy_gain_table,8,3          ## @lcnphy_gain_table
	.comm	_lcnphy_gain_index_offset_for_rssi,8,3 ## @lcnphy_gain_index_offset_for_rssi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlc_lcnphy_rx_signal_power     ; -- Begin function wlc_lcnphy_rx_signal_power
	.p2align	2
_wlc_lcnphy_rx_signal_power:            ; @wlc_lcnphy_rx_signal_power
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	str	x1, [sp, #8]
	ldr	x21, [x0, #8]
	add	x1, sp, #8
	bl	_wlc_lcnphy_get_receive_power
	mov	x20, x0
Lloh0:
	adrp	x8, _lcnphy_gain_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _lcnphy_gain_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	ldr	x22, [x8, x9, lsl #3]
	mov	x0, x19
	mov	w1, #1061
	bl	_read_phy_reg
                                        ; kill: def $w0 killed $w0 def $x0
	sbfx	x23, x0, #8, #24
	lsl	w8, w20, #4
	rbit	w9, w8
	clz	w9, w9
	cmp	w8, #0
	csinc	w9, wzr, w9, eq
	sub	w10, w9, #1
	mov	w11, #-1
	lsl	w11, w11, w10
	mov	w12, #1
	lsl	w12, w12, w9
	add	w11, w11, w8
	sxtw	x10, w10
	sub	w8, w12, w8
	cmp	w11, w8
	csel	x20, x10, x9, lt
	mov	x0, x19
	mov	w1, #1076
	bl	_read_phy_reg
	and	w8, w0, #0xff
	orr	x9, x8, #0xffffffffffffff00
	cmp	w8, #127
	csel	x24, x9, x8, hi
Lloh3:
	adrp	x8, _lcnphy_gain_index_offset_for_rssi@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lcnphy_gain_index_offset_for_rssi@GOTPAGEOFF]
	add	x20, x20, x20, lsl #1
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	ldr	x25, [x8, x9, lsl #3]
	ldr	w0, [x19]
	bl	_CHSPEC_CHANNEL
	bl	_wlc_phy_channel2freq
	sub	w8, w0, #2428
	cmp	w8, #40
	cset	w8, lo
	add	x9, x22, x23, lsr #1
	sub	x9, x25, x9
	add	x9, x9, x24
	add	x9, x9, x20
	sub	x8, x9, x8
	ldr	x9, [x21]
	sub	x10, x9, #15
	mov	w11, #286
	mov	x12, #-10010
	madd	x9, x9, x11, x12
	lsr	x9, x9, #12
	sub	x11, x9, #7
	cmn	x10, #30
	csel	x9, x11, x9, lo
	add	x20, x8, x9
	mov	x0, x19
	mov	w1, #0
	bl	_wlc_lcnphy_rx_gain_override_enable
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_lcnphy_gain_table,8,3          ; @lcnphy_gain_table
	.comm	_lcnphy_gain_index_offset_for_rssi,8,3 ; @lcnphy_gain_index_offset_for_rssi
.subsections_via_symbols
