	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlc_phy_txpwrctrl_coeff_setup_nphy
_wlc_phy_txpwrctrl_coeff_setup_nphy:    ## @wlc_phy_txpwrctrl_coeff_setup_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	$552, %rsp                      ## imm = 0x228
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_wlc_phy_stay_in_carriersearch_nphy
LBB0_2:
	leaq	-80(%rbp), %r9
	movq	%r15, %rdi
	movl	$15, %esi
	movl	$7, %edx
	movl	$80, %ecx
	movl	$16, %r8d
	callq	_wlc_phy_table_read_nphy
	movq	_NPHY_TBL_ID_CORE1TXPWRCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_NPHY_TBL_ID_CORE2TXPWRCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	jg	LBB0_6
## %bb.3:
	leaq	-68(%rbp), %rbx
	movl	$1023, %r13d                    ## imm = 0x3FF
	leaq	-592(%rbp), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$26, %r14d
	leaq	-72(%rbp), %rax
	leaq	-80(%rbp), %rcx
	cmoveq	%rcx, %rax
	movq	%rbx, %rcx
	leaq	-76(%rbp), %rdx
	cmoveq	%rdx, %rcx
	movl	(%rax), %eax
	shll	$10, %eax
	andl	$1047552, %eax                  ## imm = 0xFFC00
	movl	(%rcx), %ecx
	andl	%r13d, %ecx
	orl	%eax, %ecx
	movd	%ecx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqa	%xmm0, -592(%rbp)
	movdqa	%xmm0, -576(%rbp)
	movdqa	%xmm0, -560(%rbp)
	movdqa	%xmm0, -544(%rbp)
	movdqa	%xmm0, -528(%rbp)
	movdqa	%xmm0, -512(%rbp)
	movdqa	%xmm0, -496(%rbp)
	movdqa	%xmm0, -480(%rbp)
	movdqa	%xmm0, -464(%rbp)
	movdqa	%xmm0, -448(%rbp)
	movdqa	%xmm0, -432(%rbp)
	movdqa	%xmm0, -416(%rbp)
	movdqa	%xmm0, -400(%rbp)
	movdqa	%xmm0, -384(%rbp)
	movdqa	%xmm0, -368(%rbp)
	movdqa	%xmm0, -352(%rbp)
	movdqa	%xmm0, -336(%rbp)
	movdqa	%xmm0, -320(%rbp)
	movdqa	%xmm0, -304(%rbp)
	movdqa	%xmm0, -288(%rbp)
	movdqa	%xmm0, -272(%rbp)
	movdqa	%xmm0, -256(%rbp)
	movdqa	%xmm0, -240(%rbp)
	movdqa	%xmm0, -224(%rbp)
	movdqa	%xmm0, -208(%rbp)
	movdqa	%xmm0, -192(%rbp)
	movdqa	%xmm0, -176(%rbp)
	movdqa	%xmm0, -160(%rbp)
	movdqa	%xmm0, -144(%rbp)
	movdqa	%xmm0, -128(%rbp)
	movdqa	%xmm0, -112(%rbp)
	movdqa	%xmm0, -96(%rbp)
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$128, %edx
	movl	$320, %ecx                      ## imm = 0x140
	movl	$32, %r8d
	movq	%r12, %r9
	callq	_wlc_phy_table_write_nphy
	leal	1(%r14), %ecx
	movq	_NPHY_TBL_ID_CORE2TXPWRCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	movl	%ecx, %r14d
	jl	LBB0_4
## %bb.5:
	movq	_NPHY_TBL_ID_CORE1TXPWRCTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_6:
	cmpl	%eax, %r14d
	jle	LBB0_7
LBB0_12:
	movl	16(%r15), %edi
	movl	$2, %esi
	callq	_NREV_LT
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movq	_M_CURR_IDX1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_wlapi_bmac_write_shm
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movq	_M_CURR_IDX2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_wlapi_bmac_write_shm
LBB0_14:
	cmpq	$0, (%r15)
	je	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_wlc_phy_stay_in_carriersearch_nphy
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$552, %rsp                      ## imm = 0x228
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$128, %edx
	movl	$448, %ecx                      ## imm = 0x1C0
	movl	$32, %r8d
	leaq	-592(%rbp), %r9
	callq	_wlc_phy_table_write_nphy
	leal	1(%r14), %eax
	movq	_NPHY_TBL_ID_CORE2TXPWRCTL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	movl	%eax, %r14d
	jge	LBB0_12
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	xorl	%eax, %eax
	cmpl	$26, %r14d
	setne	%al
	movl	-60(%rbp,%rax,4), %eax
	movzbl	%ah, %ebx
	movzbl	%al, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	shll	$8, %edx
	movzwl	%dx, %eax
	movzbl	%cl, %ecx
	orl	%eax, %ecx
	movl	%ecx, -592(%rbp,%r12,4)
	incq	%r12
	cmpq	$128, %r12
	je	LBB0_11
LBB0_8:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%r15), %edi
	movl	$3, %esi
	callq	_NREV_GE
	movl	%ebx, %edx
	movl	%r13d, %ecx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	_nphy_tpc_loscale@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r12,4), %ecx
	movl	%ecx, %edx
	imull	%ebx, %edx
	subl	$-128, %edx
	sarl	$8, %edx
	imull	%r13d, %ecx
	subl	$-128, %ecx
	sarl	$8, %ecx
	jmp	LBB0_10
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NPHY_TBL_ID_CORE1TXPWRCTL,4,2  ## @NPHY_TBL_ID_CORE1TXPWRCTL
	.comm	_NPHY_TBL_ID_CORE2TXPWRCTL,4,2  ## @NPHY_TBL_ID_CORE2TXPWRCTL
	.comm	_nphy_tpc_loscale,8,3           ## @nphy_tpc_loscale
	.comm	_M_CURR_IDX1,4,2                ## @M_CURR_IDX1
	.comm	_M_CURR_IDX2,4,2                ## @M_CURR_IDX2
	.no_dead_strip	_wlc_phy_txpwrctrl_coeff_setup_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_txpwrctrl_coeff_setup_nphy
_wlc_phy_txpwrctrl_coeff_setup_nphy:    ; @wlc_phy_txpwrctrl_coeff_setup_nphy
	.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, #560
	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, #-96]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_wlc_phy_stay_in_carriersearch_nphy
LBB0_2:
	sub	x22, x29, #124
	sub	x5, x29, #124
	mov	x0, x19
	mov	w1, #15
	mov	w2, #7
	mov	w3, #80
	mov	w4, #16
	bl	_wlc_phy_table_read_nphy
Lloh3:
	adrp	x23, _NPHY_TBL_ID_CORE1TXPWRCTL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NPHY_TBL_ID_CORE1TXPWRCTL@GOTPAGEOFF]
	ldr	w20, [x23]
Lloh5:
	adrp	x21, _NPHY_TBL_ID_CORE2TXPWRCTL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _NPHY_TBL_ID_CORE2TXPWRCTL@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w20, w8
	b.gt	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x22, #8
	cmp	w20, #26
	csel	x8, x22, x8, eq
	ldr	w8, [x8]
	add	x9, x22, #4
	add	x10, x22, #12
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	and	w9, w9, #0x3ff
	bfi	w9, w8, #10, #10
	dup.4s	v0, w9
	stp	q0, q0, [sp]
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #96]
	stp	q0, q0, [sp, #128]
	stp	q0, q0, [sp, #160]
	stp	q0, q0, [sp, #192]
	stp	q0, q0, [sp, #224]
	stp	q0, q0, [sp, #256]
	stp	q0, q0, [sp, #288]
	stp	q0, q0, [sp, #320]
	stp	q0, q0, [sp, #352]
	stp	q0, q0, [sp, #384]
	stp	q0, q0, [sp, #416]
	stp	q0, q0, [sp, #448]
	stp	q0, q0, [sp, #480]
	mov	x5, sp
	mov	x0, x19
	mov	x1, x20
	mov	w2, #128
	mov	w3, #320
	mov	w4, #32
	bl	_wlc_phy_table_write_nphy
	add	w9, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	mov	x20, x9
	b.lt	LBB0_3
; %bb.4:
	ldr	w20, [x23]
LBB0_5:
	cmp	w20, w8
	b.le	LBB0_12
LBB0_6:
	ldr	w0, [x19, #16]
	mov	w1, #2
	bl	_NREV_LT
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _M_CURR_IDX1@GOTPAGE
Lloh8:
	ldr	x8, [x8, _M_CURR_IDX1@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #65535
	bl	_wlapi_bmac_write_shm
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _M_CURR_IDX2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _M_CURR_IDX2@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w2, #65535
	bl	_wlapi_bmac_write_shm
LBB0_8:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #0
	bl	_wlc_phy_stay_in_carriersearch_nphy
LBB0_10:
	ldur	x8, [x29, #-96]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.11:
	add	sp, sp, #560
	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_12:
	sub	x22, x29, #124
Lloh16:
	adrp	x23, _nphy_tpc_loscale@GOTPAGE
Lloh17:
	ldr	x23, [x23, _nphy_tpc_loscale@GOTPAGEOFF]
	orr	w24, wzr, #0x80
	mov	x25, sp
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x5, sp
	mov	x0, x19
	mov	x1, x20
	mov	w2, #128
	mov	w3, #448
	mov	w4, #32
	bl	_wlc_phy_table_write_nphy
	add	w8, w20, #1
	ldr	w9, [x21]
	cmp	w20, w9
	mov	x20, x8
	b.ge	LBB0_6
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	mov	x26, #0
	add	x8, x22, #20
	add	x9, x22, #24
	cmp	w20, #26
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	ubfx	w27, w8, #8, #8
	and	w28, w8, #0xff
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	and	w9, w9, #0xff
	bfi	w9, w8, #8, #8
	str	w9, [x25, x26]
	add	x26, x26, #4
	cmp	x26, #512
	b.eq	LBB0_13
LBB0_16:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x19, #16]
	mov	w1, #3
	bl	_NREV_GE
	mov	x8, x27
	mov	x9, x28
	cbnz	x0, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	ldr	x8, [x23]
	ldr	w9, [x8, x26]
	madd	w8, w9, w27, w24
	asr	w8, w8, #8
	madd	w9, w9, w28, w24
	asr	w9, w9, #8
	b	LBB0_15
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_NPHY_TBL_ID_CORE1TXPWRCTL,4,2  ; @NPHY_TBL_ID_CORE1TXPWRCTL
	.comm	_NPHY_TBL_ID_CORE2TXPWRCTL,4,2  ; @NPHY_TBL_ID_CORE2TXPWRCTL
	.comm	_nphy_tpc_loscale,8,3           ; @nphy_tpc_loscale
	.comm	_M_CURR_IDX1,4,2                ; @M_CURR_IDX1
	.comm	_M_CURR_IDX2,4,2                ; @M_CURR_IDX2
	.no_dead_strip	_wlc_phy_txpwrctrl_coeff_setup_nphy
.subsections_via_symbols
