	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpphy_calibration
_lpphy_calibration:                     ## @lpphy_calibration
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	cmpq	%rcx, %rax
	je	LBB0_2
## %bb.1:
	movq	%rcx, (%r14)
LBB0_2:
	cmpq	%rcx, %rax
	setne	%r15b
	movq	%rbx, %rdi
	callq	_b43_mac_suspend
	movq	%rbx, %rdi
	callq	_lpphy_btcoex_override
	cmpl	$2, (%rbx)
	jl	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_lpphy_save_dig_flt_state
LBB0_4:
	movq	%rbx, %rdi
	callq	_lpphy_read_tx_pctl_mode_from_hardware
	movl	16(%r14), %r14d
	movq	_B43_LPPHY_TXPCTL_OFF@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_lpphy_set_tx_power_control
	movl	(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	cmpl	(%r12), %r14d
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_lpphy_pr41573_workaround
	movl	(%rbx), %eax
LBB0_7:
	cmpl	$2, %eax
	setge	%al
	andb	%r15b, %al
	cmpb	$1, %al
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_lpphy_papd_cal_txpwr
LBB0_9:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_lpphy_set_tx_power_control
	cmpl	$2, (%rbx)
	jl	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_lpphy_restore_dig_flt_state
LBB0_11:
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_lpphy_rx_iq_cal
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_b43_mac_enable                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_LPPHY_TXPCTL_OFF,4,2       ## @B43_LPPHY_TXPCTL_OFF
	.no_dead_strip	_lpphy_calibration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpphy_calibration
_lpphy_calibration:                     ; @lpphy_calibration
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldp	x8, x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	str	x9, [x20]
LBB0_2:
	cmp	x8, x9
	cset	w21, ne
	mov	x0, x19
	bl	_b43_mac_suspend
	mov	x0, x19
	bl	_lpphy_btcoex_override
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_lpphy_save_dig_flt_state
LBB0_4:
	mov	x0, x19
	bl	_lpphy_read_tx_pctl_mode_from_hardware
	ldr	w20, [x20, #16]
Lloh0:
	adrp	x22, _B43_LPPHY_TXPCTL_OFF@GOTPAGE
Lloh1:
	ldr	x22, [x22, _B43_LPPHY_TXPCTL_OFF@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_lpphy_set_tx_power_control
	ldr	w8, [x19]
	cbnz	w8, LBB0_7
; %bb.5:
	ldr	w9, [x22]
	cmp	w20, w9
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_lpphy_pr41573_workaround
	ldr	w8, [x19]
LBB0_7:
	cmp	w8, #1
	cset	w8, gt
	and	w8, w8, w21
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_lpphy_papd_cal_txpwr
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_lpphy_set_tx_power_control
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_lpphy_restore_dig_flt_state
LBB0_11:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_lpphy_rx_iq_cal
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_b43_mac_enable
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_LPPHY_TXPCTL_OFF,4,2       ; @B43_LPPHY_TXPCTL_OFF
	.no_dead_strip	_lpphy_calibration
.subsections_via_symbols
