	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlc_phy_runsamples_nphy
_wlc_phy_runsamples_nphy:               ## @wlc_phy_runsamples_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_wlc_phy_stay_in_carriersearch_nphy
LBB0_2:
	movl	20(%rbx), %edi
	callq	_CHSPEC_IS40
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	16(%rbx), %edi
	movl	$7, %esi
	callq	_NREV_GE
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	movl	$834, %esi                      ## imm = 0x342
	callq	_read_phy_reg
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$835, %esi                      ## imm = 0x343
	callq	_read_phy_reg
	orl	%r12d, %eax
	testb	$-128, %al
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wlc_phy_read_lpf_bw_ctl_nphy
	movq	_NPHY_REV7_RFCTRLOVERRIDE_ID1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%rbx, %rdi
	movl	$128, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_wlc_phy_rfctrl_override_nphy_rev7
	movl	$1, (%rbx)
LBB0_5:
	movq	%rbx, %rdi
	movl	$832, %esi                      ## imm = 0x340
	callq	_read_phy_reg
	movq	%rbx, %rdi
	movl	$833, %esi                      ## imm = 0x341
	callq	_read_phy_reg
LBB0_6:
	movl	16(%rbp), %r12d
	movq	_BB_MULT_VALID_MASK@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_8
## %bb.7:
	movq	_NPHY_TBL_ID_IQLOCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r9
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$87, %ecx
	movl	$16, %r8d
	callq	_wlc_phy_table_read_nphy
	movq	_BB_MULT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	orl	(%r15), %eax
	movl	%eax, 4(%rbx)
LBB0_8:
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.9:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	movl	$25700, %eax                    ## imm = 0x6464
	movl	$18247, %ecx                    ## imm = 0x4747
	cmovel	%eax, %ecx
	movl	%ecx, -44(%rbp)
	movq	_NPHY_TBL_ID_IQLOCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r9
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$87, %ecx
	movl	$16, %r8d
	callq	_wlc_phy_table_write_nphy
LBB0_10:
	cmpq	$0, 8(%rbx)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wlc_phy_stay_in_carriersearch_nphy
LBB0_12:
	decl	%r14d
	movq	%rbx, %rdi
	movl	$198, %esi
	movl	%r14d, %edx
	callq	_write_phy_reg
	leal	-1(%r13), %edx
	cmpl	$65535, %r13d                   ## imm = 0xFFFF
	cmovel	%r13d, %edx
	movq	%rbx, %rdi
	movl	$196, %esi
	callq	_write_phy_reg
	movq	%rbx, %rdi
	movl	$197, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_write_phy_reg
	movq	%rbx, %rdi
	movl	$161, %esi
	callq	_read_phy_reg
	movl	%eax, %r14d
	movq	_NPHY_RfseqMode_CoreActv_override@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$161, %esi
	callq	_or_phy_reg
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	movl	$194, %esi
	movl	$32767, %edx                    ## imm = 0x7FFF
	callq	_and_phy_reg
	movq	%rbx, %rdi
	movl	$194, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_or_phy_reg
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
	cmpl	$1, -48(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	leal	1(,%rax,4), %edx
	movq	%rbx, %rdi
	movl	$195, %esi
	callq	_write_phy_reg
LBB0_15:
	movq	%rbx, %rdi
	movl	$164, %esi
	callq	_read_phy_reg
	andl	$1, %eax
	movl	%eax, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_SPINWAIT
	movq	%rbx, %rdi
	movl	$161, %esi
	movl	%r14d, %edx
	callq	_write_phy_reg
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NPHY_REV7_RFCTRLOVERRIDE_ID1,4,2 ## @NPHY_REV7_RFCTRLOVERRIDE_ID1
	.comm	_BB_MULT_VALID_MASK,4,2         ## @BB_MULT_VALID_MASK
	.comm	_NPHY_TBL_ID_IQLOCAL,4,2        ## @NPHY_TBL_ID_IQLOCAL
	.comm	_BB_MULT_MASK,4,2               ## @BB_MULT_MASK
	.comm	_NPHY_RfseqMode_CoreActv_override,4,2 ## @NPHY_RfseqMode_CoreActv_override
	.no_dead_strip	_wlc_phy_runsamples_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_runsamples_nphy
_wlc_phy_runsamples_nphy:               ; @wlc_phy_runsamples_nphy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x6
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_wlc_phy_stay_in_carriersearch_nphy
LBB0_2:
	ldr	w0, [x19, #20]
	bl	_CHSPEC_IS40
	mov	x26, x0
	ldr	w0, [x19, #16]
	mov	w1, #7
	bl	_NREV_GE
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	w1, #834
	bl	_read_phy_reg
	mov	x27, x0
	mov	x0, x19
	mov	w1, #835
	bl	_read_phy_reg
	orr	w8, w0, w27
	tbnz	w8, #7, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_wlc_phy_read_lpf_bw_ctl_nphy
	mov	x2, x0
Lloh0:
	adrp	x8, _NPHY_REV7_RFCTRLOVERRIDE_ID1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NPHY_REV7_RFCTRLOVERRIDE_ID1@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
	mov	x0, x19
	mov	w1, #128
	mov	w3, #0
	mov	w4, #0
	bl	_wlc_phy_rfctrl_override_nphy_rev7
	mov	w8, #1
	str	w8, [x19]
LBB0_5:
	mov	x0, x19
	mov	w1, #832
	bl	_read_phy_reg
	mov	x0, x19
	mov	w1, #833
	bl	_read_phy_reg
LBB0_6:
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x28, _BB_MULT_VALID_MASK@GOTPAGE
Lloh4:
	ldr	x28, [x28, _BB_MULT_VALID_MASK@GOTPAGEOFF]
	ldr	w9, [x28]
Lloh5:
	adrp	x27, _NPHY_TBL_ID_IQLOCAL@GOTPAGE
Lloh6:
	ldr	x27, [x27, _NPHY_TBL_ID_IQLOCAL@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
	ldr	w1, [x27]
	add	x5, sp, #12
	mov	x0, x19
	mov	w2, #1
	mov	w3, #87
	mov	w4, #16
	bl	_wlc_phy_table_read_nphy
	ldr	w8, [x28]
	ldr	w9, [sp, #12]
Lloh7:
	adrp	x10, _BB_MULT_MASK@GOTPAGE
Lloh8:
	ldr	x10, [x10, _BB_MULT_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	and	w9, w10, w9
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_8:
	cbz	w25, LBB0_10
; %bb.9:
	cmp	x26, #0
	mov	w8, #18247
	mov	w9, #25700
	csel	w8, w9, w8, eq
	str	w8, [sp, #12]
	ldr	w1, [x27]
	add	x5, sp, #12
	mov	x0, x19
	mov	w2, #1
	mov	w3, #87
	mov	w4, #16
	bl	_wlc_phy_table_write_nphy
LBB0_10:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	w1, #0
	bl	_wlc_phy_stay_in_carriersearch_nphy
LBB0_12:
	sub	w2, w24, #1
	mov	x0, x19
	mov	w1, #198
	bl	_write_phy_reg
	sub	w8, w23, #1
	mov	w9, #65535
	cmp	w23, w9
	csel	w2, w23, w8, eq
	mov	x0, x19
	mov	w1, #196
	bl	_write_phy_reg
	mov	x0, x19
	mov	w1, #197
	mov	x2, x22
	bl	_write_phy_reg
	mov	x0, x19
	mov	w1, #161
	bl	_read_phy_reg
	mov	x22, x0
Lloh10:
	adrp	x8, _NPHY_RfseqMode_CoreActv_override@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NPHY_RfseqMode_CoreActv_override@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #161
	bl	_or_phy_reg
	cbz	w21, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	w1, #194
	mov	w2, #32767
	bl	_and_phy_reg
	mov	x0, x19
	mov	w1, #194
	mov	w2, #32768
	bl	_or_phy_reg
	b	LBB0_15
LBB0_14:
	cmp	w20, #1
	mov	w8, #5
	csinc	w2, w8, wzr, eq
	mov	x0, x19
	mov	w1, #195
	bl	_write_phy_reg
LBB0_15:
	mov	x0, x19
	mov	w1, #164
	bl	_read_phy_reg
	and	w0, w0, #0x1
	mov	w1, #1000
	bl	_SPINWAIT
	mov	x0, x19
	mov	w1, #161
	mov	x2, x22
	bl	_write_phy_reg
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NPHY_REV7_RFCTRLOVERRIDE_ID1,4,2 ; @NPHY_REV7_RFCTRLOVERRIDE_ID1
	.comm	_BB_MULT_VALID_MASK,4,2         ; @BB_MULT_VALID_MASK
	.comm	_NPHY_TBL_ID_IQLOCAL,4,2        ; @NPHY_TBL_ID_IQLOCAL
	.comm	_BB_MULT_MASK,4,2               ; @BB_MULT_MASK
	.comm	_NPHY_RfseqMode_CoreActv_override,4,2 ; @NPHY_RfseqMode_CoreActv_override
	.no_dead_strip	_wlc_phy_runsamples_nphy
.subsections_via_symbols
