	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bringup_link
_bringup_link:                          ## @bringup_link
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_INFINIPATH_C_LINKENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	notl	%edx
	andl	(%rdi), %edx
	movl	%edx, (%rdi)
	movq	24(%rdi), %rax
	movl	(%rax), %esi
	callq	_ipath_write_kreg
	movl	4(%rbx), %eax
	sarl	$2, %eax
	incl	%eax
	movb	8(%rbx), %cl
	shll	%cl, %eax
	movq	_INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$5, %edx
	shlq	%cl, %rdx
	movq	_INFINIPATH_IBCC_FLOWCTRLPERIOD_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$3, %r8d
	shlq	%cl, %r8
	movq	_INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$15, %edi
	shlq	%cl, %rdi
	movq	_INFINIPATH_IBCC_CREDITSCALE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$4, %esi
	shlq	%cl, %rsi
	orl	%eax, %edx
	orl	%r8d, %edi
	movq	_INFINIPATH_IBCC_OVERRUNTHRESHOLD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$15, %eax
	shlq	%cl, %rax
	orl	%edx, %edi
	orl	%esi, %eax
	orl	%edi, %eax
	movl	%eax, 12(%rbx)
	movq	_INFINIPATH_IBCC_LINKINITCMD_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_INFINIPATH_IBCC_LINKINITCMD_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_IPATH_IB_LINK_DISABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 40(%rbx)
	orl	%eax, %edx
	movq	_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	%edx, %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_ipath_cdbg
	movq	24(%rbx), %rax
	movl	8(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_ipath_write_kreg
	movq	24(%rbx), %rax
	movl	4(%rax), %esi
	movq	%rbx, %rdi
	callq	_ipath_read_kreg64
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	32(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_3
LBB0_2:
	movl	(%rbx), %edx
	orl	(%r15), %edx
	movl	%edx, (%rbx)
	movq	24(%rbx), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ipath_write_kreg
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INFINIPATH_C_LINKENABLE,4,2    ## @INFINIPATH_C_LINKENABLE
	.comm	_INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT,4,2 ## @INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT
	.comm	_INFINIPATH_IBCC_FLOWCTRLPERIOD_SHIFT,4,2 ## @INFINIPATH_IBCC_FLOWCTRLPERIOD_SHIFT
	.comm	_INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT,4,2 ## @INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT
	.comm	_INFINIPATH_IBCC_CREDITSCALE_SHIFT,8,3 ## @INFINIPATH_IBCC_CREDITSCALE_SHIFT
	.comm	_INFINIPATH_IBCC_OVERRUNTHRESHOLD_SHIFT,4,2 ## @INFINIPATH_IBCC_OVERRUNTHRESHOLD_SHIFT
	.comm	_INFINIPATH_IBCC_LINKINITCMD_DISABLE,4,2 ## @INFINIPATH_IBCC_LINKINITCMD_DISABLE
	.comm	_INFINIPATH_IBCC_LINKINITCMD_SHIFT,4,2 ## @INFINIPATH_IBCC_LINKINITCMD_SHIFT
	.comm	_IPATH_IB_LINK_DISABLED,4,2     ## @IPATH_IB_LINK_DISABLED
	.comm	_VERBOSE,4,2                    ## @VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Writing 0x%llx to ibcctrl\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not initialize SerDes, not usable\n"

	.no_dead_strip	_bringup_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bringup_link
_bringup_link:                          ; @bringup_link
	.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
Lloh0:
	adrp	x21, _INFINIPATH_C_LINKENABLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _INFINIPATH_C_LINKENABLE@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [x0]
	bic	w2, w9, w8
	str	w2, [x0]
	ldr	x8, [x0, #24]
	ldr	w1, [x8]
	bl	_ipath_write_kreg
	ldp	w8, w9, [x19, #4]
	asr	w8, w8, #2
	add	w8, w8, #1
	lsl	w8, w8, w9
Lloh2:
	adrp	x9, _INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	mov	w10, #5
	lsl	x9, x10, x9
	orr	w8, w8, w9
Lloh5:
	adrp	x9, _INFINIPATH_IBCC_FLOWCTRLPERIOD_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INFINIPATH_IBCC_FLOWCTRLPERIOD_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	mov	w10, #3
	lsl	x9, x10, x9
	orr	w8, w8, w9
Lloh8:
	adrp	x9, _INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	mov	w10, #15
	lsl	x9, x10, x9
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _INFINIPATH_IBCC_CREDITSCALE_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _INFINIPATH_IBCC_CREDITSCALE_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	mov	w11, #4
	lsl	x9, x11, x9
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _INFINIPATH_IBCC_OVERRUNTHRESHOLD_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _INFINIPATH_IBCC_OVERRUNTHRESHOLD_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsl	x9, x10, x9
	orr	w8, w8, w9
	str	w8, [x19, #12]
Lloh17:
	adrp	x9, _INFINIPATH_IBCC_LINKINITCMD_DISABLE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _INFINIPATH_IBCC_LINKINITCMD_DISABLE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _INFINIPATH_IBCC_LINKINITCMD_SHIFT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _INFINIPATH_IBCC_LINKINITCMD_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w20, w8, w9
Lloh23:
	adrp	x8, _IPATH_IB_LINK_DISABLED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IPATH_IB_LINK_DISABLED@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	orr	w8, w9, w8
	str	w8, [x19, #40]
Lloh26:
	adrp	x8, _VERBOSE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _VERBOSE@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	sxtw	x2, w20
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ipath_cdbg
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #8]
	mov	x0, x19
	mov	x2, x20
	bl	_ipath_write_kreg
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_ipath_read_kreg64
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x0, [x19, #32]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	b	LBB0_3
LBB0_2:
	ldr	w8, [x21]
	ldr	w9, [x19]
	orr	w2, w9, w8
	str	w2, [x19]
	ldr	x8, [x19, #24]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ipath_write_kreg
LBB0_3:
	mov	x0, x20
	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
	ret
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_INFINIPATH_C_LINKENABLE,4,2    ; @INFINIPATH_C_LINKENABLE
	.comm	_INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT,4,2 ; @INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT
	.comm	_INFINIPATH_IBCC_FLOWCTRLPERIOD_SHIFT,4,2 ; @INFINIPATH_IBCC_FLOWCTRLPERIOD_SHIFT
	.comm	_INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT,4,2 ; @INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT
	.comm	_INFINIPATH_IBCC_CREDITSCALE_SHIFT,8,3 ; @INFINIPATH_IBCC_CREDITSCALE_SHIFT
	.comm	_INFINIPATH_IBCC_OVERRUNTHRESHOLD_SHIFT,4,2 ; @INFINIPATH_IBCC_OVERRUNTHRESHOLD_SHIFT
	.comm	_INFINIPATH_IBCC_LINKINITCMD_DISABLE,4,2 ; @INFINIPATH_IBCC_LINKINITCMD_DISABLE
	.comm	_INFINIPATH_IBCC_LINKINITCMD_SHIFT,4,2 ; @INFINIPATH_IBCC_LINKINITCMD_SHIFT
	.comm	_IPATH_IB_LINK_DISABLED,4,2     ; @IPATH_IB_LINK_DISABLED
	.comm	_VERBOSE,4,2                    ; @VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Writing 0x%llx to ibcctrl\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not initialize SerDes, not usable\n"

	.no_dead_strip	_bringup_link
.subsections_via_symbols
