	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlc_phy_adjust_lnagaintbl_nphy
_wlc_phy_adjust_lnagaintbl_nphy:        ## @wlc_phy_adjust_lnagaintbl_nphy
	.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, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_wlc_phy_stay_in_carriersearch_nphy
LBB0_2:
	cmpq	$0, 32(%r14)
	je	LBB0_6
## %bb.3:
	movl	24(%r14), %edi
	callq	_CHSPEC_IS2G
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	$6, -56(%rbp)
	movl	$6, %eax
	jmp	LBB0_7
LBB0_6:
	movl	$0, -56(%rbp)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movl	24(%r14), %edi
	callq	_CHSPEC_CHANNEL
	movl	%eax, %ebx
	movq	_nphy_lnagain_est0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	imull	%ebx, %edi
	addl	4(%rax), %edi
	movl	$13, %esi
	callq	_PHY_HW_ROUND
	movl	%eax, -56(%rbp)
	movq	_nphy_lnagain_est1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	imull	(%rax), %ebx
	addl	4(%rax), %ebx
	movl	%ebx, %edi
	movl	$13, %esi
	callq	_PHY_HW_ROUND
LBB0_7:
	movl	%eax, -52(%rbp)
	xorl	%ebx, %ebx
	movq	_nphy_def_lnagains@GOTPCREL(%rip), %r12
	leaq	-80(%rbp), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	-56(%rbp,%rbx,4), %r13d
	movl	8(%rax), %ecx
	addl	%r13d, %ecx
	movl	%ecx, -80(%rbp)
	movl	12(%rax), %eax
	addl	%r13d, %eax
	movl	%eax, -76(%rbp)
	movl	%eax, -72(%rbp)
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, -68(%rbp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	movl	$8, %ecx
	movl	$16, %r8d
	movq	%r15, %r9
	callq	_wlc_phy_table_write_nphy
	movq	(%r12), %rax
	movl	8(%rax), %eax
	addl	%r13d, %eax
	addl	$4, %eax
	movl	%eax, -64(%rbp,%rbx,4)
	incq	%rbx
	cmpq	16(%r14), %rbx
	jae	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%r14)
	movq	(%r12), %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	-56(%rbp,%rbx,4), %r13d
	movl	(%rax), %ecx
	addl	%r13d, %ecx
	movl	%ecx, -80(%rbp)
	movl	4(%rax), %ecx
	addl	%r13d, %ecx
	movl	%ecx, -76(%rbp)
	movl	8(%rax), %ecx
	addl	%r13d, %ecx
	movl	%ecx, -72(%rbp)
	movl	12(%rax), %eax
	addl	%r13d, %eax
	jmp	LBB0_11
LBB0_12:
	movl	-64(%rbp), %ecx
	movl	-60(%rbp), %ebx
	movq	%r14, %rdi
	movl	$30, %esi
	movl	$255, %edx
	callq	_mod_phy_reg
	movq	%r14, %rdi
	movl	$52, %esi
	movl	$255, %edx
	movl	%ebx, %ecx
	callq	_mod_phy_reg
	cmpq	$0, (%r14)
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_wlc_phy_stay_in_carriersearch_nphy
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_nphy_lnagain_est0,8,3          ## @nphy_lnagain_est0
	.comm	_nphy_lnagain_est1,8,3          ## @nphy_lnagain_est1
	.comm	_nphy_def_lnagains,8,3          ## @nphy_def_lnagains
	.no_dead_strip	_wlc_phy_adjust_lnagaintbl_nphy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wlc_phy_adjust_lnagaintbl_nphy
_wlc_phy_adjust_lnagaintbl_nphy:        ; @wlc_phy_adjust_lnagaintbl_nphy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_wlc_phy_stay_in_carriersearch_nphy
LBB0_2:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w0, [x19, #24]
	bl	_CHSPEC_IS2G
	cbz	x0, LBB0_6
; %bb.4:
	mov	w0, #6
	str	w0, [sp, #32]
	b	LBB0_7
LBB0_5:
	mov	w0, #0
	str	wzr, [sp, #32]
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19, #24]
	bl	_CHSPEC_CHANNEL
	mov	x20, x0
Lloh3:
	adrp	x8, _nphy_lnagain_est0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nphy_lnagain_est0@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldp	w9, w8, [x8]
	madd	w0, w9, w0, w8
	mov	w1, #13
	bl	_PHY_HW_ROUND
	str	w0, [sp, #32]
Lloh6:
	adrp	x8, _nphy_lnagain_est1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _nphy_lnagain_est1@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldp	w9, w8, [x8]
	madd	w0, w9, w20, w8
	mov	w1, #13
	bl	_PHY_HW_ROUND
LBB0_7:
	mov	x20, #0
	str	w0, [sp, #36]
Lloh9:
	adrp	x21, _nphy_def_lnagains@GOTPAGE
Lloh10:
	ldr	x21, [x21, _nphy_def_lnagains@GOTPAGEOFF]
	add	x22, sp, #32
	add	x23, sp, #24
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w24, [x22, x20, lsl #2]
	ldp	w9, w8, [x8, #8]
	add	w9, w24, w9
	add	w8, w8, w24
	stp	w9, w8, [sp, #8]
	str	w8, [sp, #16]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	w8, [sp, #20]
	add	x5, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w2, #4
	mov	w3, #8
	mov	w4, #16
	bl	_wlc_phy_table_write_nphy
	ldr	x8, [x21]
	ldr	w8, [x8, #8]
	add	w8, w8, w24
	add	w8, w8, #4
	str	w8, [x23, x20, lsl #2]
	add	x20, x20, #1
	ldr	x8, [x19, #16]
	cmp	x20, x8
	b.hs	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x8, [x21]
	cbnz	x9, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w24, [x22, x20, lsl #2]
	ldr	d0, [x8]
	dup.2s	v1, w24
	add.2s	v0, v1, v0
	str	d0, [sp, #8]
	ldp	w9, w8, [x8, #8]
	add	w9, w24, w9
	str	w9, [sp, #16]
	add	w8, w24, w8
	b	LBB0_9
LBB0_12:
	ldp	w3, w20, [sp, #24]
	mov	x0, x19
	mov	w1, #30
	mov	w2, #255
	bl	_mod_phy_reg
	mov	x0, x19
	mov	w1, #52
	mov	w2, #255
	mov	x3, x20
	bl	_mod_phy_reg
	ldr	x8, [x19]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	w1, #0
	bl	_wlc_phy_stay_in_carriersearch_nphy
LBB0_14:
	ldr	x8, [sp, #40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_nphy_lnagain_est0,8,3          ; @nphy_lnagain_est0
	.comm	_nphy_lnagain_est1,8,3          ; @nphy_lnagain_est1
	.comm	_nphy_def_lnagains,8,3          ; @nphy_def_lnagains
	.no_dead_strip	_wlc_phy_adjust_lnagaintbl_nphy
.subsections_via_symbols
