	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tune_active_qsfp
_tune_active_qsfp:                      ## @tune_active_qsfp
	.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
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rdi), %r14d
	movq	16(%rdi), %r15
	movl	$1, 24(%rdi)
	xorl	%esi, %esi
	callq	_set_qsfp_tx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	%rbx, %rdi
	callq	_qual_power
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movq	%rbx, %rdi
	callq	_qual_bitrate
	testl	%eax, %eax
	je	LBB0_3
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	cmpl	$0, 28(%rbx)
	je	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_reset_qsfp
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	leaq	16(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_refresh_qsfp_cache
	jmp	LBB0_7
LBB0_6:
	movl	$1, 28(%rbx)
LBB0_7:
	movq	%rbx, %rdi
	callq	_set_qsfp_high_power
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movq	_QSFP_EQ_INFO_OFFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$4, (%r15,%rax,4)
	movl	8(%rbx), %edi
	movq	_PLATFORM_CONFIG_PORT_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jne	LBB0_9
## %bb.13:
	movq	_PORT_TABLE_TX_PRESET_IDX_ACTIVE_NO_EQ@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_PORT_TABLE_TX_PRESET_IDX_ACTIVE_EQ@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %ecx
	xorl	%edx, %edx
	movq	%r12, %r15
	movq	%r12, %r8
	movl	$4, %r9d
	callq	_get_platform_config_field
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movq	_OPA_INVALID_INDEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r15)
	jmp	LBB0_12
LBB0_14:
	movl	8(%rbx), %edi
	movq	_PLATFORM_CONFIG_PORT_TABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_PORT_TABLE_RX_PRESET_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edx, %edx
	movq	%r13, %r8
	movl	$4, %r9d
	callq	_get_platform_config_field
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movq	_OPA_INVALID_INDEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r13)
	jmp	LBB0_12
LBB0_16:
	movq	_OPA_LINK_SPEED_25G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %eax
	je	LBB0_19
## %bb.17:
	andl	%r14d, %eax
	je	LBB0_19
## %bb.18:
	movq	_PORT_TABLE_LOCAL_ATTEN_25G@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_19:
	movq	_OPA_LINK_SPEED_12_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_23
## %bb.20:
	andl	%r14d, %eax
	je	LBB0_23
## %bb.21:
	movq	_PORT_TABLE_LOCAL_ATTEN_12G@GOTPCREL(%rip), %rax
LBB0_22:
	movl	8(%rbx), %edi
	movl	(%r12), %esi
	movl	(%rax), %ecx
	xorl	%edx, %edx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movl	$4, %r9d
	callq	_get_platform_config_field
LBB0_23:
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_apply_cdr_settings
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_apply_eq_settings
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_apply_rx_amplitude_settings
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_qsfp_tx                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_QSFP_EQ_INFO_OFFS,8,3          ## @QSFP_EQ_INFO_OFFS
	.comm	_PLATFORM_CONFIG_PORT_TABLE,4,2 ## @PLATFORM_CONFIG_PORT_TABLE
	.comm	_PORT_TABLE_TX_PRESET_IDX_ACTIVE_EQ,4,2 ## @PORT_TABLE_TX_PRESET_IDX_ACTIVE_EQ
	.comm	_OPA_INVALID_INDEX,4,2          ## @OPA_INVALID_INDEX
	.comm	_PORT_TABLE_TX_PRESET_IDX_ACTIVE_NO_EQ,4,2 ## @PORT_TABLE_TX_PRESET_IDX_ACTIVE_NO_EQ
	.comm	_PORT_TABLE_RX_PRESET_IDX,4,2   ## @PORT_TABLE_RX_PRESET_IDX
	.comm	_OPA_LINK_SPEED_25G,4,2         ## @OPA_LINK_SPEED_25G
	.comm	_PORT_TABLE_LOCAL_ATTEN_25G,4,2 ## @PORT_TABLE_LOCAL_ATTEN_25G
	.comm	_OPA_LINK_SPEED_12_5G,4,2       ## @OPA_LINK_SPEED_12_5G
	.comm	_PORT_TABLE_LOCAL_ATTEN_12G,4,2 ## @PORT_TABLE_LOCAL_ATTEN_12G
	.no_dead_strip	_tune_active_qsfp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tune_active_qsfp
_tune_active_qsfp:                      ; @tune_active_qsfp
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldp	w25, w24, [x0]
	mov	x23, x0
	ldr	x26, [x23, #16]!
	mov	w8, #1
	str	w8, [x0, #24]
	mov	w1, #0
	bl	_set_qsfp_tx
	cbnz	w0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_qual_power
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_qual_bitrate
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x20, #28]
	cbz	w8, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_reset_qsfp
	cbnz	w0, LBB0_3
; %bb.6:
	mov	x0, x20
	mov	x1, x23
	bl	_refresh_qsfp_cache
	b	LBB0_8
LBB0_7:
	mov	w8, #1
	str	w8, [x20, #28]
LBB0_8:
	mov	x0, x20
	bl	_set_qsfp_high_power
	cbnz	w0, LBB0_3
; %bb.9:
Lloh0:
	adrp	x8, _QSFP_EQ_INFO_OFFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QSFP_EQ_INFO_OFFS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x26, x8, lsl #2]
	ldr	w0, [x20, #8]
Lloh3:
	adrp	x23, _PLATFORM_CONFIG_PORT_TABLE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PLATFORM_CONFIG_PORT_TABLE@GOTPAGEOFF]
	ldr	w1, [x23]
	tbnz	w8, #2, LBB0_11
; %bb.10:
Lloh5:
	adrp	x8, _PORT_TABLE_TX_PRESET_IDX_ACTIVE_NO_EQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PORT_TABLE_TX_PRESET_IDX_ACTIVE_NO_EQ@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh7:
	adrp	x8, _PORT_TABLE_TX_PRESET_IDX_ACTIVE_EQ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PORT_TABLE_TX_PRESET_IDX_ACTIVE_EQ@GOTPAGEOFF]
LBB0_12:
	ldr	w3, [x8]
	mov	w2, #0
	mov	x4, x19
	mov	w5, #4
	bl	_get_platform_config_field
	cbz	w0, LBB0_14
; %bb.13:
Lloh9:
	adrp	x8, _OPA_INVALID_INDEX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OPA_INVALID_INDEX@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_3
LBB0_14:
	ldr	w0, [x20, #8]
	ldr	w1, [x23]
Lloh12:
	adrp	x8, _PORT_TABLE_RX_PRESET_IDX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PORT_TABLE_RX_PRESET_IDX@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	w2, #0
	mov	x4, x21
	mov	w5, #4
	bl	_get_platform_config_field
	cbz	w0, LBB0_16
; %bb.15:
Lloh15:
	adrp	x8, _OPA_INVALID_INDEX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OPA_INVALID_INDEX@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x21]
	b	LBB0_3
LBB0_16:
Lloh18:
	adrp	x8, _OPA_LINK_SPEED_25G@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OPA_LINK_SPEED_25G@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w25
	b.eq	LBB0_19
; %bb.17:
	and	w8, w8, w24
	cbz	w8, LBB0_19
; %bb.18:
Lloh21:
	adrp	x8, _PORT_TABLE_LOCAL_ATTEN_25G@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PORT_TABLE_LOCAL_ATTEN_25G@GOTPAGEOFF]
	b	LBB0_22
LBB0_19:
Lloh23:
	adrp	x8, _OPA_LINK_SPEED_12_5G@GOTPAGE
Lloh24:
	ldr	x8, [x8, _OPA_LINK_SPEED_12_5G@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w25
	b.eq	LBB0_23
; %bb.20:
	and	w8, w8, w24
	cbz	w8, LBB0_23
; %bb.21:
Lloh26:
	adrp	x8, _PORT_TABLE_LOCAL_ATTEN_12G@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PORT_TABLE_LOCAL_ATTEN_12G@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x20, #8]
	ldr	w1, [x23]
	ldr	w3, [x8]
	mov	w2, #0
	mov	x4, x22
	mov	w5, #4
	bl	_get_platform_config_field
LBB0_23:
	ldr	w1, [x21]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_apply_cdr_settings
	ldr	w1, [x21]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_apply_eq_settings
	ldr	w1, [x21]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_apply_rx_amplitude_settings
	mov	x0, x20
	mov	w1, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_set_qsfp_tx
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_QSFP_EQ_INFO_OFFS,8,3          ; @QSFP_EQ_INFO_OFFS
	.comm	_PLATFORM_CONFIG_PORT_TABLE,4,2 ; @PLATFORM_CONFIG_PORT_TABLE
	.comm	_PORT_TABLE_TX_PRESET_IDX_ACTIVE_EQ,4,2 ; @PORT_TABLE_TX_PRESET_IDX_ACTIVE_EQ
	.comm	_OPA_INVALID_INDEX,4,2          ; @OPA_INVALID_INDEX
	.comm	_PORT_TABLE_TX_PRESET_IDX_ACTIVE_NO_EQ,4,2 ; @PORT_TABLE_TX_PRESET_IDX_ACTIVE_NO_EQ
	.comm	_PORT_TABLE_RX_PRESET_IDX,4,2   ; @PORT_TABLE_RX_PRESET_IDX
	.comm	_OPA_LINK_SPEED_25G,4,2         ; @OPA_LINK_SPEED_25G
	.comm	_PORT_TABLE_LOCAL_ATTEN_25G,4,2 ; @PORT_TABLE_LOCAL_ATTEN_25G
	.comm	_OPA_LINK_SPEED_12_5G,4,2       ; @OPA_LINK_SPEED_12_5G
	.comm	_PORT_TABLE_LOCAL_ATTEN_12G,4,2 ; @PORT_TABLE_LOCAL_ATTEN_12G
	.no_dead_strip	_tune_active_qsfp
.subsections_via_symbols
