	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bringup_serdes                 ## -- Begin function bringup_serdes
	.p2align	4, 0x90
_bringup_serdes:                        ## @bringup_serdes
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	movq	_EXTENDED_PSN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_IS_KSET
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_RCV_CTRL_RCV_EXTENDED_PSN_ENABLE_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_add_rcvctrl
LBB0_2:
	movq	16(%rbx), %rax
	movq	_HFI1_PORT_GUID_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	jne	LBB0_7
## %bb.3:
	movq	(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.5:
	movq	24(%rbx), %rsi
	addq	%rsi, %rdx
	decq	%rdx
	jmp	LBB0_6
LBB0_4:
	xorl	%edx, %edx
LBB0_6:
	movq	%rdx, (%rax,%rcx,8)
LBB0_7:
	movq	_OPA_LINKINIT_REASON_LINKUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, %rdi
	callq	_init_lcb
	movq	_loopback@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_init_loopback
	testl	%eax, %eax
	js	LBB0_12
LBB0_9:
	movq	%rbx, %rdi
	callq	_get_port_type
	movq	(%rbx), %rax
	movq	_PORT_TYPE_QSFP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_set_qsfp_int_n
	movq	%rbx, %rdi
	callq	_wait_for_qsfp_init
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_set_qsfp_int_n
LBB0_11:
	movq	%rbx, %rdi
	callq	_try_start_link
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXTENDED_PSN,4,2               ## @EXTENDED_PSN
	.comm	_RCV_CTRL_RCV_EXTENDED_PSN_ENABLE_SMASK,4,2 ## @RCV_CTRL_RCV_EXTENDED_PSN_ENABLE_SMASK
	.comm	_HFI1_PORT_GUID_INDEX,8,3       ## @HFI1_PORT_GUID_INDEX
	.comm	_OPA_LINKINIT_REASON_LINKUP,4,2 ## @OPA_LINKINIT_REASON_LINKUP
	.comm	_loopback,8,3                   ## @loopback
	.comm	_PORT_TYPE_QSFP,8,3             ## @PORT_TYPE_QSFP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bringup_serdes                 ; -- Begin function bringup_serdes
	.p2align	2
_bringup_serdes:                        ; @bringup_serdes
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #32]
Lloh0:
	adrp	x8, _EXTENDED_PSN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXTENDED_PSN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_HFI1_CAP_IS_KSET
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _RCV_CTRL_RCV_EXTENDED_PSN_ENABLE_SMASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RCV_CTRL_RCV_EXTENDED_PSN_ENABLE_SMASK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_add_rcvctrl
LBB0_2:
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _HFI1_PORT_GUID_INDEX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HFI1_PORT_GUID_INDEX@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x10, [x8, x9, lsl #3]
	cbnz	x10, LBB0_6
; %bb.3:
	ldr	x10, [x20]
	cbz	x10, LBB0_5
; %bb.4:
	ldr	x11, [x19, #24]
	add	x10, x10, x11
	sub	x10, x10, #1
LBB0_5:
	str	x10, [x8, x9, lsl #3]
LBB0_6:
Lloh9:
	adrp	x8, _OPA_LINKINIT_REASON_LINKUP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OPA_LINKINIT_REASON_LINKUP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_init_lcb
Lloh12:
	adrp	x8, _loopback@GOTPAGE
Lloh13:
	ldr	x8, [x8, _loopback@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_init_loopback
	tbnz	w0, #31, LBB0_11
LBB0_8:
	mov	x0, x19
	bl	_get_port_type
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _PORT_TYPE_QSFP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PORT_TYPE_QSFP@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #0
	bl	_set_qsfp_int_n
	mov	x0, x19
	bl	_wait_for_qsfp_init
	mov	x0, x19
	mov	w1, #1
	bl	_set_qsfp_int_n
LBB0_10:
	mov	x0, x19
	bl	_try_start_link
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EXTENDED_PSN,4,2               ; @EXTENDED_PSN
	.comm	_RCV_CTRL_RCV_EXTENDED_PSN_ENABLE_SMASK,4,2 ; @RCV_CTRL_RCV_EXTENDED_PSN_ENABLE_SMASK
	.comm	_HFI1_PORT_GUID_INDEX,8,3       ; @HFI1_PORT_GUID_INDEX
	.comm	_OPA_LINKINIT_REASON_LINKUP,4,2 ; @OPA_LINKINIT_REASON_LINKUP
	.comm	_loopback,8,3                   ; @loopback
	.comm	_PORT_TYPE_QSFP,8,3             ; @PORT_TYPE_QSFP
.subsections_via_symbols
