	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlc_phy_noise_read_shmem
_wlc_phy_noise_read_shmem:              ## @wlc_phy_noise_read_shmem
	.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	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PHY_CORE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rbx
	shlq	$3, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_PHY_NOISE_FIXED_VAL_NPHY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leal	(,%r14,8), %r14d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	cmpq	$0, 16(%r12)
	je	LBB0_11
## %bb.1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_PHY_NOISE_SAMPLE_LOG_NUM_UCODE@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movq	%rax, %rdx
	sarq	%cl, %rdx
	movq	%rdx, (%rsi,%r14,8)
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	%rax, %r13
	incq	%r14
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	16(%r12), %rax
	incq	%rbx
	cmpq	%rax, %r14
	jae	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_M_PWRIND_MAP
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_wlapi_bmac_read_shm
	movl	%eax, %r15d
	movq	24(%r12), %rax
	movl	(%rax), %r12d
	incq	%rbx
	movq	%rbx, %rdi
	callq	_M_PWRIND_MAP
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_wlapi_bmac_read_shm
	shll	$16, %eax
	addl	%r15d, %eax
	cltq
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, (%rsi,%r14,8)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PHY_NOISE_FIXED_VAL_NPHY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, (%rdx,%r14,8)
	jmp	LBB0_5
LBB0_6:
	testq	%r13, %r13
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_wlc_phy_noise_calc_phy
	movq	16(%r12), %rax
LBB0_8:
	testq	%rax, %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_11
## %bb.9:
	movq	8(%r12), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rcx,8), %rdx
	movq	(%rax,%rcx,8), %rsi
	movq	(%r12), %rdi
	movq	%rdx, (%rsi,%rdi,8)
	movq	(%r14,%rcx,8), %rdx
	cmpq	%rbx, %rdx
	cmovgq	%rdx, %rbx
	incq	%rcx
	cmpq	16(%r12), %rcx
	jb	LBB0_10
LBB0_11:
	movq	(%r12), %rdi
	movq	_PHY_NOISE_WINDOW_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MODINC_POW2
	movq	%rax, (%r12)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_CORE_MAX,4,2               ## @PHY_CORE_MAX
	.comm	_PHY_NOISE_FIXED_VAL_NPHY,8,3   ## @PHY_NOISE_FIXED_VAL_NPHY
	.comm	_PHY_NOISE_SAMPLE_LOG_NUM_UCODE,8,3 ## @PHY_NOISE_SAMPLE_LOG_NUM_UCODE
	.comm	_PHY_NOISE_WINDOW_SZ,4,2        ## @PHY_NOISE_WINDOW_SZ
	.no_dead_strip	_wlc_phy_noise_read_shmem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wlc_phy_noise_read_shmem
_wlc_phy_noise_read_shmem:              ; @wlc_phy_noise_read_shmem
	.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, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _PHY_CORE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHY_CORE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x13, x10, #0xffffffff0
	sub	x22, x9, x13
	mov	sp, x22
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x21, x8, x13
	mov	sp, x21
Lloh10:
	adrp	x8, _PHY_NOISE_FIXED_VAL_NPHY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PHY_NOISE_FIXED_VAL_NPHY@GOTPAGEOFF]
Lloh12:
	ldr	x20, [x8]
	lsl	w23, w12, #3
	mov	x0, x22
	mov	w1, #0
	mov	x2, x23
	bl	_memset
	mov	x0, x21
	mov	w1, #0
	mov	x2, x23
	bl	_memset
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_11
; %bb.1:
	mov	x28, #0
	mov	x23, #0
	mov	x27, #0
Lloh13:
	adrp	x26, _PHY_NOISE_SAMPLE_LOG_NUM_UCODE@GOTPAGE
Lloh14:
	ldr	x26, [x26, _PHY_NOISE_SAMPLE_LOG_NUM_UCODE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x26]
	asr	x9, x8, x9
	str	x9, [x22, x28, lsl #3]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, x8
	add	x28, x28, #1
	ldr	x8, [x19, #16]
	add	x23, x23, #1
	cmp	x28, x8
	b.hs	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w24, [x8]
	mov	x0, x23
	bl	_M_PWRIND_MAP
	mov	x1, x0
	mov	x0, x24
	bl	_wlapi_bmac_read_shm
	mov	x24, x0
	ldr	x8, [x19, #24]
	ldr	w25, [x8]
	add	x23, x23, #1
	mov	x0, x23
	bl	_M_PWRIND_MAP
	mov	x1, x0
	mov	x0, x25
	bl	_wlapi_bmac_read_shm
	adds	w8, w24, w0, lsl #16
	sxtw	x8, w8
	str	x8, [x22, x28, lsl #3]
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh15:
	adrp	x9, _PHY_NOISE_FIXED_VAL_NPHY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PHY_NOISE_FIXED_VAL_NPHY@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	str	x9, [x21, x28, lsl #3]
	b	LBB0_3
LBB0_6:
	cbz	x27, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_wlc_phy_noise_calc_phy
	ldr	x8, [x19, #16]
LBB0_8:
	cbz	x8, LBB0_11
; %bb.9:
	mov	x8, #0
	ldr	x9, [x19, #8]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	lsl	x10, x8, #3
	ldr	x11, [x21, x10]
	ldr	x12, [x9, x10]
	ldr	x13, [x19]
	str	x11, [x12, x13, lsl #3]
	ldr	x10, [x21, x10]
	cmp	x10, x20
	csel	x20, x10, x20, gt
	add	x8, x8, #1
	ldr	x10, [x19, #16]
	cmp	x8, x10
	b.lo	LBB0_10
LBB0_11:
	ldr	x0, [x19]
Lloh18:
	adrp	x8, _PHY_NOISE_WINDOW_SZ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PHY_NOISE_WINDOW_SZ@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_MODINC_POW2
	str	x0, [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_13
; %bb.12:
	mov	x0, x20
	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_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_CORE_MAX,4,2               ; @PHY_CORE_MAX
	.comm	_PHY_NOISE_FIXED_VAL_NPHY,8,3   ; @PHY_NOISE_FIXED_VAL_NPHY
	.comm	_PHY_NOISE_SAMPLE_LOG_NUM_UCODE,8,3 ; @PHY_NOISE_SAMPLE_LOG_NUM_UCODE
	.comm	_PHY_NOISE_WINDOW_SZ,4,2        ; @PHY_NOISE_WINDOW_SZ
	.no_dead_strip	_wlc_phy_noise_read_shmem
.subsections_via_symbols
