	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlc_lcnphy_txpwrtbl_iqlo_cal
_wlc_lcnphy_txpwrtbl_iqlo_cal:          ## @wlc_lcnphy_txpwrtbl_iqlo_cal
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_wlc_lcnphy_get_tx_pwr_ctrl
	movq	%rax, %r14
	movq	8(%rbx), %r15
	leaq	-216(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_get_tx_gain
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_get_pa_gain
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_get_bbmult
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	_LCNPHY_TX_PWR_CTRL_OFF@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movl	$255, %eax
	movq	%r14, -136(%rbp)                ## 8-byte Spill
	cmpq	%rsi, %r14
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_get_current_tx_pwr_idx
	movq	(%r12), %rsi
LBB0_2:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_set_tx_pwr_ctrl
	movq	$7, -72(%rbp)
	movl	$21, -64(%rbp)
	movq	$0, -56(%rbp)
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_set_tx_gain
	movl	(%rbx), %edi
	movl	$1, %esi
	callq	_LCNREV_IS
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	cmpq	$0, 56(%r15)
	je	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	movl	$30, %esi
	callq	_wlc_lcnphy_set_tx_pwr_by_index
	cmpq	$0, 64(%r15)
	jne	LBB0_5
## %bb.6:
	movq	_LCNPHY_CAL_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_LCNPHY_CAL_RECAL@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edx
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_wlc_lcnphy_tx_iqlo_cal
LBB0_9:
	leaq	-152(%rbp), %rsi
	leaq	-144(%rbp), %rdx
	leaq	-88(%rbp), %rcx
	leaq	-80(%rbp), %r8
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_get_radio_loft
	movl	-88(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$15, %ecx
	jne	LBB0_15
## %bb.10:
	movl	-80(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$15, %ecx
	jne	LBB0_15
## %bb.11:
	movl	4(%rbx), %edi
	callq	_CHSPEC_IS5G
	testq	%rax, %rax
	movl	$7, %eax
	movl	$255, %ecx
	cmovnel	%ecx, %eax
	movl	$45, %edx
	cmovnel	%ecx, %edx
	movl	$186, %ecx
	movl	$240, %esi
	cmovel	%ecx, %esi
	movl	%eax, -72(%rbp)
	movl	%edx, -68(%rbp)
	movl	%esi, -64(%rbp)
	movq	$0, -56(%rbp)
	movl	(%rbx), %edi
	movl	$1, %esi
	callq	_LCNREV_IS
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	cmpq	$0, 56(%r15)
	je	LBB0_14
LBB0_13:
	movabsq	$128849018880, %rax             ## imm = 0x1E00000000
	movq	%rax, -68(%rbp)
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_wlc_lcnphy_set_tx_pwr_by_index
	movq	_LCNPHY_CAL_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_wlc_lcnphy_tx_iqlo_cal
LBB0_15:
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	leaq	-104(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_get_tx_iqcc
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_get_tx_locc
	movq	%rax, %r15
	movq	_LCNPHY_TBL_ID_TXPWRCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -160(%rbp)
	movl	$32, -192(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, -184(%rbp)
	movl	$1, -176(%rbp)
	xorl	%r14d, %r14d
	leaq	-192(%rbp), %r12
	movq	_LCNPHY_TX_PWR_CTRL_LO_OFFSET@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	_LCNPHY_TX_PWR_CTRL_IQ_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r14, %rax
	movq	%rax, -168(%rbp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_wlc_lcnphy_read_table
	movl	-44(%rbp), %eax
	movl	$-1048576, %ecx                 ## imm = 0xFFF00000
	andl	%ecx, %eax
	movl	-104(%rbp), %ecx
	shll	$10, %ecx
	andl	$1047552, %ecx                  ## imm = 0xFFC00
	orl	%eax, %ecx
	movl	-96(%rbp), %eax
	movl	$1023, %edx                     ## imm = 0x3FF
	andl	%edx, %eax
	orl	%ecx, %eax
	movl	%eax, -44(%rbp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_wlc_lcnphy_write_table
	movl	%r15d, -44(%rbp)
	movq	(%r13), %rax
	addq	%r14, %rax
	movq	%rax, -168(%rbp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_wlc_lcnphy_write_table
	incq	%r14
	cmpq	$128, %r14
	jne	LBB0_16
## %bb.17:
	movq	-104(%rbp), %rax
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, 48(%rcx)
	movq	-96(%rbp), %rax
	movq	%rax, 40(%rcx)
	movq	%r15, 32(%rcx)
	movq	-152(%rbp), %rax
	movq	%rax, 24(%rcx)
	movq	-144(%rbp), %rax
	movq	%rax, 16(%rcx)
	movq	-88(%rbp), %rax
	movq	%rax, 8(%rcx)
	movq	-80(%rbp), %rax
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	callq	_wlc_lcnphy_set_bbmult
	movq	%rbx, %rdi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	callq	_wlc_lcnphy_set_pa_gain
	leaq	-216(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_set_tx_gain
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	movq	_LCNPHY_TX_PWR_CTRL_OFF@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_18
## %bb.19:
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_wlc_lcnphy_set_tx_pwr_by_index
	jmp	LBB0_20
LBB0_18:
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_set_tx_pwr_ctrl
LBB0_20:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_wlc_lcnphy_set_tx_pwr_by_index
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_tx_iqlo_soft_cal_full
	jmp	LBB0_9
LBB0_14:
	movq	%rbx, %rdi
	callq	_wlc_lcnphy_tx_iqlo_soft_cal_full
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_LCNPHY_TX_PWR_CTRL_OFF,8,3     ## @LCNPHY_TX_PWR_CTRL_OFF
	.comm	_LCNPHY_CAL_RECAL,4,2           ## @LCNPHY_CAL_RECAL
	.comm	_LCNPHY_CAL_FULL,4,2            ## @LCNPHY_CAL_FULL
	.comm	_LCNPHY_TBL_ID_TXPWRCTL,4,2     ## @LCNPHY_TBL_ID_TXPWRCTL
	.comm	_LCNPHY_TX_PWR_CTRL_RATE_OFFSET,8,3 ## @LCNPHY_TX_PWR_CTRL_RATE_OFFSET
	.comm	_LCNPHY_TX_PWR_CTRL_IQ_OFFSET,8,3 ## @LCNPHY_TX_PWR_CTRL_IQ_OFFSET
	.comm	_LCNPHY_TX_PWR_CTRL_LO_OFFSET,8,3 ## @LCNPHY_TX_PWR_CTRL_LO_OFFSET
	.no_dead_strip	_wlc_lcnphy_txpwrtbl_iqlo_cal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function wlc_lcnphy_txpwrtbl_iqlo_cal
lCPI0_0:
	.long	7                               ; 0x7
	.long	0                               ; 0x0
lCPI0_1:
	.long	7                               ; 0x7
	.long	45                              ; 0x2d
lCPI0_2:
	.long	0                               ; 0x0
	.long	30                              ; 0x1e
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_wlc_lcnphy_txpwrtbl_iqlo_cal:          ; @wlc_lcnphy_txpwrtbl_iqlo_cal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	x28, x27, [sp, #160]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #176]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #192]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.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	x19, x0
	bl	_wlc_lcnphy_get_tx_pwr_ctrl
	mov	x20, x0
	ldr	x25, [x19, #8]
	add	x1, sp, #104
	mov	x0, x19
	bl	_wlc_lcnphy_get_tx_gain
	mov	x0, x19
	bl	_wlc_lcnphy_get_pa_gain
	mov	x21, x0
	mov	x0, x19
	bl	_wlc_lcnphy_get_bbmult
	mov	x23, x0
Lloh0:
	adrp	x26, _LCNPHY_TX_PWR_CTRL_OFF@GOTPAGE
Lloh1:
	ldr	x26, [x26, _LCNPHY_TX_PWR_CTRL_OFF@GOTPAGEOFF]
	ldr	x1, [x26]
	cmp	x20, x1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_wlc_lcnphy_get_current_tx_pwr_idx
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
	ldr	x1, [x26]
	b	LBB0_3
LBB0_2:
	mov	w8, #255
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
LBB0_3:
	mov	x0, x19
	bl	_wlc_lcnphy_set_tx_pwr_ctrl
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x29, #-112]
	mov	w8, #21
	stur	w8, [x29, #-104]
	stur	xzr, [x29, #-96]
	sub	x1, x29, #112
	mov	x0, x19
	bl	_wlc_lcnphy_set_tx_gain
	ldr	w0, [x19]
	mov	w1, #1
	bl	_LCNREV_IS
Lloh4:
	adrp	x24, _LCNPHY_CAL_FULL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _LCNPHY_CAL_FULL@GOTPAGEOFF]
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x25, #56]
	cbz	x8, LBB0_17
LBB0_5:
	mov	x0, x19
	mov	w1, #30
	bl	_wlc_lcnphy_set_tx_pwr_by_index
	ldr	x8, [x25, #64]
Lloh6:
	adrp	x9, _LCNPHY_CAL_RECAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LCNPHY_CAL_RECAL@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x24, x9, eq
	ldr	w2, [x8]
	sub	x1, x29, #112
	mov	x0, x19
	mov	w3, #0
	bl	_wlc_lcnphy_tx_iqlo_cal
LBB0_6:
	add	x1, sp, #32
	add	x2, sp, #24
	add	x3, sp, #16
	add	x4, sp, #8
	mov	x0, x19
	bl	_wlc_lcnphy_get_radio_loft
	ldr	w8, [sp, #16]
	cmp	w8, #0
	cneg	w8, w8, mi
	cmp	w8, #15
	b.ne	LBB0_11
; %bb.7:
	ldr	w8, [sp, #8]
	cmp	w8, #0
	cneg	w8, w8, mi
	cmp	w8, #15
	b.ne	LBB0_11
; %bb.8:
	ldr	w0, [x19, #4]
	bl	_CHSPEC_IS5G
	cmp	x0, #0
	cset	w8, eq
	mov	w9, #240
	mov	w10, #186
	csel	w9, w10, w9, eq
	dup.2s	v0, w8
	shl.2s	v0, v0, #31
	cmlt.2s	v0, v0, #0
Lloh8:
	adrp	x8, lCPI0_1@PAGE
Lloh9:
	ldr	d1, [x8, lCPI0_1@PAGEOFF]
	movi	d2, #0x0000ff000000ff
	bsl.8b	v0, v1, v2
	stur	d0, [x29, #-112]
	stur	w9, [x29, #-104]
	stur	xzr, [x29, #-96]
	ldr	w0, [x19]
	mov	w1, #1
	bl	_LCNREV_IS
	cbnz	x0, LBB0_10
; %bb.9:
	ldr	x8, [x25, #56]
	cbz	x8, LBB0_18
LBB0_10:
Lloh10:
	adrp	x8, lCPI0_2@PAGE
Lloh11:
	ldr	d0, [x8, lCPI0_2@PAGEOFF]
	stur	d0, [x29, #-108]
	mov	x0, x19
	mov	w1, #16
	bl	_wlc_lcnphy_set_tx_pwr_by_index
	ldr	w2, [x24]
	sub	x1, x29, #112
	mov	x0, x19
	mov	w3, #0
	bl	_wlc_lcnphy_tx_iqlo_cal
LBB0_11:
	add	x1, sp, #96
	add	x2, sp, #88
	mov	x0, x19
	bl	_wlc_lcnphy_get_tx_iqcc
	mov	x0, x19
	bl	_wlc_lcnphy_get_tx_locc
	mov	x24, x0
	mov	x27, #0
Lloh12:
	adrp	x8, _LCNPHY_TBL_ID_TXPWRCTL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LCNPHY_TBL_ID_TXPWRCTL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	w9, #32
	str	w9, [sp, #40]
	add	x9, sp, #84
	str	x9, [sp, #48]
	mov	w9, #1
	str	w8, [sp, #72]
	str	w9, [sp, #56]
Lloh15:
	adrp	x28, _LCNPHY_TX_PWR_CTRL_IQ_OFFSET@GOTPAGE
Lloh16:
	ldr	x28, [x28, _LCNPHY_TX_PWR_CTRL_IQ_OFFSET@GOTPAGEOFF]
Lloh17:
	adrp	x22, _LCNPHY_TX_PWR_CTRL_LO_OFFSET@GOTPAGE
Lloh18:
	ldr	x22, [x22, _LCNPHY_TX_PWR_CTRL_LO_OFFSET@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x28]
	add	x8, x27, x8
	str	x8, [sp, #64]
	add	x1, sp, #40
	mov	x0, x19
	bl	_wlc_lcnphy_read_table
	ldr	w8, [sp, #84]
	and	w8, w8, #0xfff00000
	ldr	w9, [sp, #96]
	bfi	w8, w9, #10, #10
	ldr	w9, [sp, #88]
	bfxil	w8, w9, #0, #10
	str	w8, [sp, #84]
	add	x1, sp, #40
	mov	x0, x19
	bl	_wlc_lcnphy_write_table
	str	w24, [sp, #84]
	ldr	x8, [x22]
	add	x8, x27, x8
	str	x8, [sp, #64]
	add	x1, sp, #40
	mov	x0, x19
	bl	_wlc_lcnphy_write_table
	add	x27, x27, #1
	cmp	x27, #128
	b.ne	LBB0_12
; %bb.13:
	ldr	x9, [sp, #96]
	ldr	x8, [sp, #88]
	stp	x8, x9, [x25, #40]
	ldp	x10, x8, [sp, #24]
	stp	x8, x24, [x25, #24]
	ldp	x9, x8, [sp, #8]
	stp	x8, x10, [x25, #8]
	str	x9, [x25]
	mov	x0, x19
	mov	x1, x23
	bl	_wlc_lcnphy_set_bbmult
	mov	x0, x19
	mov	x1, x21
	bl	_wlc_lcnphy_set_pa_gain
	add	x1, sp, #104
	mov	x0, x19
	bl	_wlc_lcnphy_set_tx_gain
	ldr	x8, [x26]
	mov	x0, x19
	cmp	x20, x8
	b.ne	LBB0_15
; %bb.14:
	ldr	w1, [sp, #4]                    ; 4-byte Folded Reload
	bl	_wlc_lcnphy_set_tx_pwr_by_index
	b	LBB0_16
LBB0_15:
	mov	x1, x20
	bl	_wlc_lcnphy_set_tx_pwr_ctrl
LBB0_16:
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #192]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #176]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_17:
	mov	x0, x19
	mov	w1, #16
	bl	_wlc_lcnphy_set_tx_pwr_by_index
	mov	x0, x19
	bl	_wlc_lcnphy_tx_iqlo_soft_cal_full
	b	LBB0_6
LBB0_18:
	mov	x0, x19
	bl	_wlc_lcnphy_tx_iqlo_soft_cal_full
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LCNPHY_TX_PWR_CTRL_OFF,8,3     ; @LCNPHY_TX_PWR_CTRL_OFF
	.comm	_LCNPHY_CAL_RECAL,4,2           ; @LCNPHY_CAL_RECAL
	.comm	_LCNPHY_CAL_FULL,4,2            ; @LCNPHY_CAL_FULL
	.comm	_LCNPHY_TBL_ID_TXPWRCTL,4,2     ; @LCNPHY_TBL_ID_TXPWRCTL
	.comm	_LCNPHY_TX_PWR_CTRL_RATE_OFFSET,8,3 ; @LCNPHY_TX_PWR_CTRL_RATE_OFFSET
	.comm	_LCNPHY_TX_PWR_CTRL_IQ_OFFSET,8,3 ; @LCNPHY_TX_PWR_CTRL_IQ_OFFSET
	.comm	_LCNPHY_TX_PWR_CTRL_LO_OFFSET,8,3 ; @LCNPHY_TX_PWR_CTRL_LO_OFFSET
	.no_dead_strip	_wlc_lcnphy_txpwrtbl_iqlo_cal
.subsections_via_symbols
