	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bgx_sgmii_change_link_state
_bgx_sgmii_change_link_state:           ## @bgx_sgmii_change_link_state
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r13
	movl	16(%rdi), %esi
	movq	_BGX_CMRX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_bgx_reg_read
	movq	_CMR_PKT_TX_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movq	_CMR_PKT_RX_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	%r15d, %ebx
	orl	%r12d, %ebx
	notl	%ebx
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	andl	%eax, %ebx
	movl	16(%r14), %esi
	movq	_BGX_CMRX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%ebx, %ecx
	callq	_bgx_reg_write
	movl	16(%r14), %esi
	movq	_BGX_GMP_GMI_PRTX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GMI_PORT_CFG_RX_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	xorl	%r8d, %r8d
	callq	_bgx_poll_reg
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	16(%r13), %rdi
	movl	8(%r13), %edx
	movl	16(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	%r12d, -64(%rbp)                ## 4-byte Spill
	movl	16(%r14), %esi
	movq	_BGX_GMP_GMI_PRTX_CFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	_GMI_PORT_CFG_TX_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	xorl	%r8d, %r8d
	callq	_bgx_poll_reg
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	16(%r13), %rdi
	movl	8(%r13), %edx
	movl	16(%r14), %ecx
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_5:
	movl	16(%r14), %esi
	movl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_bgx_reg_read
	movq	%r13, %rdi
	movl	%eax, %r13d
	movl	16(%r14), %esi
	movq	_BGX_GMP_PCS_MISCX_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_bgx_reg_read
	movl	%eax, %ebx
	cmpq	$0, 8(%r14)
	movq	_PCS_MISC_CTL_GMX_ENO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	je	LBB0_7
## %bb.6:
	notl	%eax
	andl	%eax, %ebx
	movq	_GMI_PORT_CFG_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r13d
	movl	(%r14), %edx
	shll	$2, %edx
	orl	%r13d, %edx
	jmp	LBB0_8
LBB0_7:
	orl	%eax, %ebx
	movl	%r13d, %edx
LBB0_8:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %eax
	cmpl	$1000, %eax                     ## imm = 0x3E8
	je	LBB0_15
## %bb.9:
	cmpl	$100, %eax
	je	LBB0_13
## %bb.10:
	cmpl	$10, %eax
	jne	LBB0_11
## %bb.12:
	movq	_GMI_PORT_CFG_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movq	_GMI_PORT_CFG_SPEED_MSB@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_GMI_PORT_CFG_SLOT_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movq	_PCS_MISC_CTL_SAMP_PT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	orl	$50, %ebx
	jmp	LBB0_14
LBB0_15:
	movq	_GMI_PORT_CFG_SPEED@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_GMI_PORT_CFG_SPEED_MSB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movq	_GMI_PORT_CFG_SLOT_TIME@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, %r13d
	movq	_PCS_MISC_CTL_SAMP_PT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	orl	$1, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	16(%r14), %esi
	movq	_BGX_GMP_GMI_TXX_SLOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	$512, %ecx                      ## imm = 0x200
	callq	_bgx_reg_write
	cmpl	$0, (%r14)
	movl	16(%r14), %esi
	movq	_BGX_GMP_GMI_TXX_BURST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	je	LBB0_17
## %bb.16:
	xorl	%ecx, %ecx
	jmp	LBB0_18
LBB0_13:
	movq	_GMI_PORT_CFG_SPEED@GOTPCREL(%rip), %rax
	movq	_GMI_PORT_CFG_SPEED_MSB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_GMI_PORT_CFG_SLOT_TIME@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, %edx
	movq	_PCS_MISC_CTL_SAMP_PT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	orl	$5, %ebx
LBB0_14:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	16(%r14), %esi
	movq	_BGX_GMP_GMI_TXX_SLOT@GOTPCREL(%rip), %rax
	movl	%edx, %r13d
	movl	(%rax), %edx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	$64, %ecx
	callq	_bgx_reg_write
	movl	16(%r14), %esi
	movq	_BGX_GMP_GMI_TXX_BURST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_bgx_reg_write
	jmp	LBB0_19
LBB0_11:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_BGX_GMP_PCS_MISCX_CTL@GOTPCREL(%rip), %rax
	movl	%edx, %r13d
	jmp	LBB0_20
LBB0_17:
	movl	$8192, %ecx                     ## imm = 0x2000
LBB0_18:
	callq	_bgx_reg_write
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_19:
	movq	_BGX_GMP_PCS_MISCX_CTL@GOTPCREL(%rip), %rax
LBB0_20:
	movl	16(%r14), %esi
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %ecx
	callq	_bgx_reg_write
	movl	16(%r14), %esi
	movq	_BGX_GMP_GMI_PRTX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r13d, %ecx
	callq	_bgx_reg_write
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	andl	%r12d, %r15d
	je	LBB0_22
## %bb.21:
	movq	_CMR_PKT_RX_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_22:
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	andl	%r12d, %eax
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movq	_CMR_PKT_TX_EN@GOTPCREL(%rip), %r14
	je	LBB0_24
## %bb.23:
	movl	(%r14), %eax
LBB0_24:
	orl	%ecx, %r15d
	orl	%eax, %r15d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %esi
	movq	_BGX_CMRX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_bgx_reg_write
	cmpq	$0, (%rbx)
	je	LBB0_26
## %bb.25:
	movl	(%r14), %eax
	movq	_CMR_PKT_RX_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%r15d, %eax
	je	LBB0_26
## %bb.27:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	8(%r13), %rdi
	movl	4(%r13), %esi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xcv_setup_link                 ## TAILCALL
LBB0_26:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGX_CMRX_CFG,4,2               ## @BGX_CMRX_CFG
	.comm	_CMR_PKT_TX_EN,4,2              ## @CMR_PKT_TX_EN
	.comm	_CMR_PKT_RX_EN,4,2              ## @CMR_PKT_RX_EN
	.comm	_BGX_GMP_GMI_PRTX_CFG,4,2       ## @BGX_GMP_GMI_PRTX_CFG
	.comm	_GMI_PORT_CFG_RX_IDLE,4,2       ## @GMI_PORT_CFG_RX_IDLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BGX%d LMAC%d GMI RX not idle\n"

	.comm	_GMI_PORT_CFG_TX_IDLE,4,2       ## @GMI_PORT_CFG_TX_IDLE
L_.str.1:                               ## @.str.1
	.asciz	"BGX%d LMAC%d GMI TX not idle\n"

	.comm	_BGX_GMP_PCS_MISCX_CTL,4,2      ## @BGX_GMP_PCS_MISCX_CTL
	.comm	_PCS_MISC_CTL_GMX_ENO,4,2       ## @PCS_MISC_CTL_GMX_ENO
	.comm	_GMI_PORT_CFG_DUPLEX,4,2        ## @GMI_PORT_CFG_DUPLEX
	.comm	_GMI_PORT_CFG_SPEED,4,2         ## @GMI_PORT_CFG_SPEED
	.comm	_GMI_PORT_CFG_SPEED_MSB,4,2     ## @GMI_PORT_CFG_SPEED_MSB
	.comm	_GMI_PORT_CFG_SLOT_TIME,4,2     ## @GMI_PORT_CFG_SLOT_TIME
	.comm	_PCS_MISC_CTL_SAMP_PT_MASK,4,2  ## @PCS_MISC_CTL_SAMP_PT_MASK
	.comm	_BGX_GMP_GMI_TXX_SLOT,4,2       ## @BGX_GMP_GMI_TXX_SLOT
	.comm	_BGX_GMP_GMI_TXX_BURST,4,2      ## @BGX_GMP_GMI_TXX_BURST
	.no_dead_strip	_bgx_sgmii_change_link_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bgx_sgmii_change_link_state
_bgx_sgmii_change_link_state:           ; @bgx_sgmii_change_link_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x20, [x0, #24]
	ldr	w1, [x0, #16]
Lloh0:
	adrp	x27, _BGX_CMRX_CFG@GOTPAGE
Lloh1:
	ldr	x27, [x27, _BGX_CMRX_CFG@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x20
	bl	_bgx_reg_read
	mov	x24, x0
Lloh2:
	adrp	x8, _CMR_PKT_TX_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMR_PKT_TX_EN@GOTPAGEOFF]
Lloh4:
	adrp	x26, _CMR_PKT_RX_EN@GOTPAGE
Lloh5:
	ldr	x26, [x26, _CMR_PKT_RX_EN@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
	ldr	w23, [x26]
	orr	w8, w23, w22
	bic	w21, w0, w8
	ldr	w1, [x19, #16]
	ldr	w2, [x27]
	mov	x0, x20
	mov	x3, x21
	bl	_bgx_reg_write
	ldr	w1, [x19, #16]
Lloh7:
	adrp	x28, _BGX_GMP_GMI_PRTX_CFG@GOTPAGE
Lloh8:
	ldr	x28, [x28, _BGX_GMP_GMI_PRTX_CFG@GOTPAGEOFF]
	ldr	w2, [x28]
Lloh9:
	adrp	x8, _GMI_PORT_CFG_RX_IDLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GMI_PORT_CFG_RX_IDLE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w4, #0
	bl	_bgx_poll_reg
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x20, #16]
	ldr	w2, [x20, #8]
	ldr	w3, [x19, #16]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w1, [x19, #16]
	ldr	w2, [x28]
Lloh14:
	adrp	x8, _GMI_PORT_CFG_TX_IDLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GMI_PORT_CFG_TX_IDLE@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w4, #0
	bl	_bgx_poll_reg
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x0, [x20, #16]
	ldr	w2, [x20, #8]
	ldr	w3, [x19, #16]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_dev_err
LBB0_5:
	ldr	w1, [x19, #16]
	ldr	w2, [x28]
	mov	x0, x20
	bl	_bgx_reg_read
	mov	x25, x0
	ldr	w1, [x19, #16]
Lloh19:
	adrp	x8, _BGX_GMP_PCS_MISCX_CTL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BGX_GMP_PCS_MISCX_CTL@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_bgx_reg_read
	ldr	x9, [x19, #8]
Lloh22:
	adrp	x8, _PCS_MISC_CTL_GMX_ENO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PCS_MISC_CTL_GMX_ENO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cbz	x9, LBB0_7
; %bb.6:
	bic	w3, w0, w8
Lloh25:
	adrp	x8, _GMI_PORT_CFG_DUPLEX@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GMI_PORT_CFG_DUPLEX@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bic	w8, w25, w8
	ldr	w9, [x19]
	orr	w25, w8, w9, lsl #2
	b	LBB0_8
LBB0_7:
	orr	w3, w8, w0
LBB0_8:
	and	w9, w22, w24
	and	w24, w23, w24
	ldr	w8, [x19, #4]
	cmp	w8, #1000
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	b.eq	LBB0_12
; %bb.9:
	cmp	w8, #100
	b.eq	LBB0_14
; %bb.10:
	cmp	w8, #10
	mov	x22, x25
	b.ne	LBB0_16
; %bb.11:
Lloh28:
	adrp	x8, _GMI_PORT_CFG_SPEED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GMI_PORT_CFG_SPEED@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	bic	w8, w22, w8
Lloh31:
	adrp	x9, _GMI_PORT_CFG_SPEED_MSB@GOTPAGE
Lloh32:
	ldr	x9, [x9, _GMI_PORT_CFG_SPEED_MSB@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh34:
	adrp	x9, _GMI_PORT_CFG_SLOT_TIME@GOTPAGE
Lloh35:
	ldr	x9, [x9, _GMI_PORT_CFG_SLOT_TIME@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	bic	w22, w8, w9
Lloh37:
	adrp	x8, _PCS_MISC_CTL_SAMP_PT_MASK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PCS_MISC_CTL_SAMP_PT_MASK@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	bic	w8, w3, w8
	mov	w9, #50
	b	LBB0_15
LBB0_12:
Lloh40:
	adrp	x8, _GMI_PORT_CFG_SPEED@GOTPAGE
Lloh41:
	ldr	x8, [x8, _GMI_PORT_CFG_SPEED@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	orr	w8, w8, w25
Lloh43:
	adrp	x9, _GMI_PORT_CFG_SPEED_MSB@GOTPAGE
Lloh44:
	ldr	x9, [x9, _GMI_PORT_CFG_SPEED_MSB@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
Lloh46:
	adrp	x10, _GMI_PORT_CFG_SLOT_TIME@GOTPAGE
Lloh47:
	ldr	x10, [x10, _GMI_PORT_CFG_SLOT_TIME@GOTPAGEOFF]
	bic	w8, w8, w9
Lloh48:
	ldr	w9, [x10]
	orr	w22, w8, w9
Lloh49:
	adrp	x8, _PCS_MISC_CTL_SAMP_PT_MASK@GOTPAGE
Lloh50:
	ldr	x8, [x8, _PCS_MISC_CTL_SAMP_PT_MASK@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	bic	w8, w3, w8
	orr	w25, w8, #0x1
	ldr	w1, [x19, #16]
Lloh52:
	adrp	x8, _BGX_GMP_GMI_TXX_SLOT@GOTPAGE
Lloh53:
	ldr	x8, [x8, _BGX_GMP_GMI_TXX_SLOT@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #512
	bl	_bgx_reg_write
	ldr	w8, [x19]
	ldr	w1, [x19, #16]
Lloh55:
	adrp	x9, _BGX_GMP_GMI_TXX_BURST@GOTPAGE
Lloh56:
	ldr	x9, [x9, _BGX_GMP_GMI_TXX_BURST@GOTPAGEOFF]
Lloh57:
	ldr	w2, [x9]
	mov	x0, x20
	cbz	w8, LBB0_17
; %bb.13:
	mov	w3, #0
	b	LBB0_18
LBB0_14:
Lloh58:
	adrp	x8, _GMI_PORT_CFG_SPEED@GOTPAGE
Lloh59:
	ldr	x8, [x8, _GMI_PORT_CFG_SPEED@GOTPAGEOFF]
Lloh60:
	adrp	x9, _GMI_PORT_CFG_SPEED_MSB@GOTPAGE
Lloh61:
	ldr	x9, [x9, _GMI_PORT_CFG_SPEED_MSB@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
Lloh63:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh64:
	adrp	x9, _GMI_PORT_CFG_SLOT_TIME@GOTPAGE
Lloh65:
	ldr	x9, [x9, _GMI_PORT_CFG_SLOT_TIME@GOTPAGEOFF]
Lloh66:
	ldr	w9, [x9]
	orr	w8, w8, w9
	mov	x22, x25
	bic	w22, w25, w8
Lloh67:
	adrp	x8, _PCS_MISC_CTL_SAMP_PT_MASK@GOTPAGE
Lloh68:
	ldr	x8, [x8, _PCS_MISC_CTL_SAMP_PT_MASK@GOTPAGEOFF]
Lloh69:
	ldr	w8, [x8]
	bic	w8, w3, w8
	mov	w9, #5
LBB0_15:
	orr	w23, w8, w9
	ldr	w1, [x19, #16]
Lloh70:
	adrp	x8, _BGX_GMP_GMI_TXX_SLOT@GOTPAGE
Lloh71:
	ldr	x8, [x8, _BGX_GMP_GMI_TXX_SLOT@GOTPAGEOFF]
Lloh72:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #64
	bl	_bgx_reg_write
	ldr	w1, [x19, #16]
Lloh73:
	adrp	x8, _BGX_GMP_GMI_TXX_BURST@GOTPAGE
Lloh74:
	ldr	x8, [x8, _BGX_GMP_GMI_TXX_BURST@GOTPAGEOFF]
Lloh75:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #0
	bl	_bgx_reg_write
	mov	x3, x23
LBB0_16:
Lloh76:
	adrp	x23, _CMR_PKT_TX_EN@GOTPAGE
Lloh77:
	ldr	x23, [x23, _CMR_PKT_TX_EN@GOTPAGEOFF]
Lloh78:
	adrp	x8, _BGX_GMP_PCS_MISCX_CTL@GOTPAGE
Lloh79:
	ldr	x8, [x8, _BGX_GMP_PCS_MISCX_CTL@GOTPAGEOFF]
	b	LBB0_19
LBB0_17:
	mov	w3, #8192
LBB0_18:
	bl	_bgx_reg_write
Lloh80:
	adrp	x23, _CMR_PKT_TX_EN@GOTPAGE
Lloh81:
	ldr	x23, [x23, _CMR_PKT_TX_EN@GOTPAGEOFF]
Lloh82:
	adrp	x8, _BGX_GMP_PCS_MISCX_CTL@GOTPAGE
Lloh83:
	ldr	x8, [x8, _BGX_GMP_PCS_MISCX_CTL@GOTPAGEOFF]
	mov	x3, x25
LBB0_19:
	ldr	w1, [x19, #16]
	ldr	w2, [x8]
	mov	x0, x20
	bl	_bgx_reg_write
	ldr	w1, [x19, #16]
	ldr	w2, [x28]
	mov	x0, x20
	mov	x3, x22
	bl	_bgx_reg_write
	ldr	w8, [x26]
	cmp	w24, #0
	csel	w8, wzr, w8, eq
	ldr	w9, [x23]
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	cmp	w10, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w21
	orr	w21, w8, w9
	ldr	w1, [x19, #16]
	ldr	w2, [x27]
	mov	x0, x20
	mov	x3, x21
	bl	_bgx_reg_write
	ldr	x8, [x20]
	cbz	x8, LBB0_22
; %bb.20:
	ldr	w8, [x26]
	ldr	w9, [x23]
	orr	w8, w9, w8
	tst	w8, w21
	b.eq	LBB0_22
; %bb.21:
	ldr	x0, [x19, #8]
	ldr	w1, [x19, #4]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_xcv_setup_link
LBB0_22:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh62
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGot	Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpLdrGot	Lloh80, Lloh81
	.cfi_endproc
                                        ; -- End function
	.comm	_BGX_CMRX_CFG,4,2               ; @BGX_CMRX_CFG
	.comm	_CMR_PKT_TX_EN,4,2              ; @CMR_PKT_TX_EN
	.comm	_CMR_PKT_RX_EN,4,2              ; @CMR_PKT_RX_EN
	.comm	_BGX_GMP_GMI_PRTX_CFG,4,2       ; @BGX_GMP_GMI_PRTX_CFG
	.comm	_GMI_PORT_CFG_RX_IDLE,4,2       ; @GMI_PORT_CFG_RX_IDLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BGX%d LMAC%d GMI RX not idle\n"

	.comm	_GMI_PORT_CFG_TX_IDLE,4,2       ; @GMI_PORT_CFG_TX_IDLE
l_.str.1:                               ; @.str.1
	.asciz	"BGX%d LMAC%d GMI TX not idle\n"

	.comm	_BGX_GMP_PCS_MISCX_CTL,4,2      ; @BGX_GMP_PCS_MISCX_CTL
	.comm	_PCS_MISC_CTL_GMX_ENO,4,2       ; @PCS_MISC_CTL_GMX_ENO
	.comm	_GMI_PORT_CFG_DUPLEX,4,2        ; @GMI_PORT_CFG_DUPLEX
	.comm	_GMI_PORT_CFG_SPEED,4,2         ; @GMI_PORT_CFG_SPEED
	.comm	_GMI_PORT_CFG_SPEED_MSB,4,2     ; @GMI_PORT_CFG_SPEED_MSB
	.comm	_GMI_PORT_CFG_SLOT_TIME,4,2     ; @GMI_PORT_CFG_SLOT_TIME
	.comm	_PCS_MISC_CTL_SAMP_PT_MASK,4,2  ; @PCS_MISC_CTL_SAMP_PT_MASK
	.comm	_BGX_GMP_GMI_TXX_SLOT,4,2       ; @BGX_GMP_GMI_TXX_SLOT
	.comm	_BGX_GMP_GMI_TXX_BURST,4,2      ; @BGX_GMP_GMI_TXX_BURST
	.no_dead_strip	_bgx_sgmii_change_link_state
.subsections_via_symbols
