	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bgx_lmac_xaui_init
_bgx_lmac_xaui_init:                    ## @bgx_lmac_xaui_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	(%rsi), %r14d
	movq	_BGX_SPUX_CONTROL1@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_SPU_CTL_RESET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	%r14d, %esi
	callq	_bgx_reg_modify
	movl	(%r13), %edx
	movl	(%rbx), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$1, %r8d
	callq	_bgx_poll_reg
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	$-1, %r15d
	jmp	LBB0_12
LBB0_2:
	movq	_BGX_CMRX_CFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movq	_CMR_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movl	(%r13), %edx
	movq	_SPU_CTL_LOW_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_modify
	movq	8(%r15), %rax
	movq	_BGX_MODE_RXAUI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_BGX_SPUX_MISC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SPU_MISC_CTL_INTLV_RDISP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_modify
LBB0_4:
	movq	_BGX_SPUX_MISC_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movq	_SPU_MISC_CTL_RX_DIS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movq	_BGX_SMUX_RX_INT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_bgx_reg_write
	movq	_BGX_SMUX_TX_INT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_bgx_reg_write
	movq	_BGX_SPUX_INT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_bgx_reg_write
	cmpq	$0, 16(%r15)
	je	LBB0_6
## %bb.5:
	movq	_BGX_SPUX_BR_PMD_LP_CUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_bgx_reg_write
	movq	_BGX_SPUX_BR_PMD_LD_CUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_bgx_reg_write
	movq	_BGX_SPUX_BR_PMD_LD_REP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_bgx_reg_write
	movq	_BGX_SPUX_BR_PMD_CRTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SPU_PMD_CRTL_TRAIN_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_modify
LBB0_6:
	movq	_BGX_SMUX_TX_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SMU_TX_APPEND_FCS_D@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_modify
	movq	_BGX_SPUX_FEC_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movq	_SPU_FEC_CTL_FEC_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movq	_BGX_SPUX_AN_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movq	_SPU_AN_CTL_AN_EN@GOTPCREL(%rip), %rdx
	movq	_SPU_AN_CTL_XNP_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movq	_BGX_SPUX_AN_ADV@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movq	8(%r15), %rcx
	movq	_BGX_MODE_10G_KR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.7:
	orl	$8388608, %eax                  ## imm = 0x800000
	jmp	LBB0_11
LBB0_8:
	movq	_BGX_MODE_40G_KR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.9:
	orl	$16777216, %eax                 ## imm = 0x1000000
	jmp	LBB0_11
LBB0_10:
	andl	$-25165825, %eax                ## imm = 0xFE7FFFFF
LBB0_11:
	andl	$-37752833, %eax                ## imm = 0xFDBFEFFF
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_bgx_reg_write
	movq	_BGX_SPU_DBG_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_bgx_reg_read
	movq	_SPU_DBG_CTL_AN_ARB_LINK_CHK_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_bgx_reg_write
	movq	_BGX_CMRX_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CMR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_modify
	movq	_BGX_SPUX_CONTROL1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movq	_SPU_CTL_LOW_POWER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movq	_BGX_SMUX_TX_CTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	movq	_SMU_TX_CTL_UNI_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_SMU_TX_CTL_DIC_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movq	_BCK_EN@GOTPCREL(%rip), %rax
	movq	_DRP_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_BGX_SMUX_CBFC_CTL@GOTPCREL(%rip), %rax
	movq	_TX_EN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	(%rax), %edx
	movq	_RX_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movq	_BGX_SMUX_TX_PAUSE_PKT_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DEFAULT_PAUSE_TIME@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movq	_BGX_SMUX_TX_PAUSE_PKT_INTERVAL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_read
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	movl	(%rbx), %edx
	movl	$-4096, %ecx                    ## imm = 0xF000
	addl	(%r13), %ecx
	orl	%eax, %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_write
	movq	_BGX_SMUX_TX_PAUSE_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_bgx_reg_write
	movq	_BGX_SMUX_TX_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$255, %ecx
	callq	_bgx_reg_modify
	movq	_BGX_SMUX_RX_JABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAX_FRAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bgx_reg_modify
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGX_SPUX_CONTROL1,4,2          ## @BGX_SPUX_CONTROL1
	.comm	_SPU_CTL_RESET,4,2              ## @SPU_CTL_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BGX SPU reset not completed\n"

	.comm	_BGX_CMRX_CFG,4,2               ## @BGX_CMRX_CFG
	.comm	_CMR_EN,4,2                     ## @CMR_EN
	.comm	_SPU_CTL_LOW_POWER,4,2          ## @SPU_CTL_LOW_POWER
	.comm	_BGX_MODE_RXAUI,8,3             ## @BGX_MODE_RXAUI
	.comm	_BGX_SPUX_MISC_CONTROL,4,2      ## @BGX_SPUX_MISC_CONTROL
	.comm	_SPU_MISC_CTL_INTLV_RDISP,4,2   ## @SPU_MISC_CTL_INTLV_RDISP
	.comm	_SPU_MISC_CTL_RX_DIS,4,2        ## @SPU_MISC_CTL_RX_DIS
	.comm	_BGX_SMUX_RX_INT,4,2            ## @BGX_SMUX_RX_INT
	.comm	_BGX_SMUX_TX_INT,4,2            ## @BGX_SMUX_TX_INT
	.comm	_BGX_SPUX_INT,4,2               ## @BGX_SPUX_INT
	.comm	_BGX_SPUX_BR_PMD_LP_CUP,4,2     ## @BGX_SPUX_BR_PMD_LP_CUP
	.comm	_BGX_SPUX_BR_PMD_LD_CUP,4,2     ## @BGX_SPUX_BR_PMD_LD_CUP
	.comm	_BGX_SPUX_BR_PMD_LD_REP,4,2     ## @BGX_SPUX_BR_PMD_LD_REP
	.comm	_BGX_SPUX_BR_PMD_CRTL,4,2       ## @BGX_SPUX_BR_PMD_CRTL
	.comm	_SPU_PMD_CRTL_TRAIN_EN,4,2      ## @SPU_PMD_CRTL_TRAIN_EN
	.comm	_BGX_SMUX_TX_APPEND,4,2         ## @BGX_SMUX_TX_APPEND
	.comm	_SMU_TX_APPEND_FCS_D,4,2        ## @SMU_TX_APPEND_FCS_D
	.comm	_BGX_SPUX_FEC_CONTROL,4,2       ## @BGX_SPUX_FEC_CONTROL
	.comm	_SPU_FEC_CTL_FEC_EN,4,2         ## @SPU_FEC_CTL_FEC_EN
	.comm	_BGX_SPUX_AN_CONTROL,4,2        ## @BGX_SPUX_AN_CONTROL
	.comm	_SPU_AN_CTL_AN_EN,4,2           ## @SPU_AN_CTL_AN_EN
	.comm	_SPU_AN_CTL_XNP_EN,4,2          ## @SPU_AN_CTL_XNP_EN
	.comm	_BGX_SPUX_AN_ADV,4,2            ## @BGX_SPUX_AN_ADV
	.comm	_BGX_MODE_10G_KR,8,3            ## @BGX_MODE_10G_KR
	.comm	_BGX_MODE_40G_KR,8,3            ## @BGX_MODE_40G_KR
	.comm	_BGX_SPU_DBG_CONTROL,4,2        ## @BGX_SPU_DBG_CONTROL
	.comm	_SPU_DBG_CTL_AN_ARB_LINK_CHK_EN,4,2 ## @SPU_DBG_CTL_AN_ARB_LINK_CHK_EN
	.comm	_BGX_SMUX_TX_CTL,4,2            ## @BGX_SMUX_TX_CTL
	.comm	_SMU_TX_CTL_UNI_EN,4,2          ## @SMU_TX_CTL_UNI_EN
	.comm	_SMU_TX_CTL_DIC_EN,4,2          ## @SMU_TX_CTL_DIC_EN
	.comm	_BGX_SMUX_CBFC_CTL,4,2          ## @BGX_SMUX_CBFC_CTL
	.comm	_BCK_EN,4,2                     ## @BCK_EN
	.comm	_DRP_EN,4,2                     ## @DRP_EN
	.comm	_TX_EN,4,2                      ## @TX_EN
	.comm	_RX_EN,4,2                      ## @RX_EN
	.comm	_BGX_SMUX_TX_PAUSE_PKT_TIME,4,2 ## @BGX_SMUX_TX_PAUSE_PKT_TIME
	.comm	_DEFAULT_PAUSE_TIME,4,2         ## @DEFAULT_PAUSE_TIME
	.comm	_BGX_SMUX_TX_PAUSE_PKT_INTERVAL,4,2 ## @BGX_SMUX_TX_PAUSE_PKT_INTERVAL
	.comm	_BGX_SMUX_TX_PAUSE_ZERO,4,2     ## @BGX_SMUX_TX_PAUSE_ZERO
	.comm	_BGX_SMUX_TX_THRESH,4,2         ## @BGX_SMUX_TX_THRESH
	.comm	_BGX_SMUX_RX_JABBER,4,2         ## @BGX_SMUX_RX_JABBER
	.comm	_MAX_FRAME_SIZE,4,2             ## @MAX_FRAME_SIZE
	.no_dead_strip	_bgx_lmac_xaui_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bgx_lmac_xaui_init
_bgx_lmac_xaui_init:                    ; @bgx_lmac_xaui_init
	.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	x21, x1
	mov	x19, x0
	ldr	w20, [x1]
Lloh0:
	adrp	x22, _BGX_SPUX_CONTROL1@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BGX_SPUX_CONTROL1@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh2:
	adrp	x23, _SPU_CTL_RESET@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SPU_CTL_RESET@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x1, x20
	bl	_bgx_reg_modify
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #1
	bl	_bgx_poll_reg
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #-1
	b	LBB0_10
LBB0_2:
Lloh6:
	adrp	x23, _BGX_CMRX_CFG@GOTPAGE
Lloh7:
	ldr	x23, [x23, _BGX_CMRX_CFG@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
Lloh8:
	adrp	x25, _CMR_EN@GOTPAGE
Lloh9:
	ldr	x25, [x25, _CMR_EN@GOTPAGEOFF]
	ldr	w8, [x25]
	bic	w3, w0, w8
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
	ldr	w2, [x22]
Lloh10:
	adrp	x24, _SPU_CTL_LOW_POWER@GOTPAGE
Lloh11:
	ldr	x24, [x24, _SPU_CTL_LOW_POWER@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_modify
	ldr	x8, [x21, #8]
Lloh12:
	adrp	x9, _BGX_MODE_RXAUI@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BGX_MODE_RXAUI@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x26, _BGX_SPUX_MISC_CONTROL@GOTPAGE
Lloh16:
	ldr	x26, [x26, _BGX_SPUX_MISC_CONTROL@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w2, [x26]
Lloh17:
	adrp	x8, _SPU_MISC_CTL_INTLV_RDISP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SPU_MISC_CTL_INTLV_RDISP@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_modify
LBB0_4:
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
Lloh20:
	adrp	x8, _SPU_MISC_CTL_RX_DIS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SPU_MISC_CTL_RX_DIS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh23:
	adrp	x26, _BGX_SMUX_RX_INT@GOTPAGE
Lloh24:
	ldr	x26, [x26, _BGX_SMUX_RX_INT@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
	mov	x3, x0
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh25:
	adrp	x26, _BGX_SMUX_TX_INT@GOTPAGE
Lloh26:
	ldr	x26, [x26, _BGX_SMUX_TX_INT@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
	mov	x3, x0
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh27:
	adrp	x26, _BGX_SPUX_INT@GOTPAGE
Lloh28:
	ldr	x26, [x26, _BGX_SPUX_INT@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
	mov	x3, x0
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_6
; %bb.5:
Lloh29:
	adrp	x8, _BGX_SPUX_BR_PMD_LP_CUP@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BGX_SPUX_BR_PMD_LP_CUP@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_bgx_reg_write
Lloh32:
	adrp	x8, _BGX_SPUX_BR_PMD_LD_CUP@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BGX_SPUX_BR_PMD_LD_CUP@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_bgx_reg_write
Lloh35:
	adrp	x8, _BGX_SPUX_BR_PMD_LD_REP@GOTPAGE
Lloh36:
	ldr	x8, [x8, _BGX_SPUX_BR_PMD_LD_REP@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_bgx_reg_write
Lloh38:
	adrp	x8, _BGX_SPUX_BR_PMD_CRTL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _BGX_SPUX_BR_PMD_CRTL@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
Lloh41:
	adrp	x8, _SPU_PMD_CRTL_TRAIN_EN@GOTPAGE
Lloh42:
	ldr	x8, [x8, _SPU_PMD_CRTL_TRAIN_EN@GOTPAGEOFF]
Lloh43:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_modify
LBB0_6:
Lloh44:
	adrp	x8, _BGX_SMUX_TX_APPEND@GOTPAGE
Lloh45:
	ldr	x8, [x8, _BGX_SMUX_TX_APPEND@GOTPAGEOFF]
Lloh46:
	ldr	w2, [x8]
Lloh47:
	adrp	x8, _SMU_TX_APPEND_FCS_D@GOTPAGE
Lloh48:
	ldr	x8, [x8, _SMU_TX_APPEND_FCS_D@GOTPAGEOFF]
Lloh49:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_modify
Lloh50:
	adrp	x26, _BGX_SPUX_FEC_CONTROL@GOTPAGE
Lloh51:
	ldr	x26, [x26, _BGX_SPUX_FEC_CONTROL@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
Lloh52:
	adrp	x8, _SPU_FEC_CTL_FEC_EN@GOTPAGE
Lloh53:
	ldr	x8, [x8, _SPU_FEC_CTL_FEC_EN@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh55:
	adrp	x26, _BGX_SPUX_AN_CONTROL@GOTPAGE
Lloh56:
	ldr	x26, [x26, _BGX_SPUX_AN_CONTROL@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
Lloh57:
	adrp	x8, _SPU_AN_CTL_AN_EN@GOTPAGE
Lloh58:
	ldr	x8, [x8, _SPU_AN_CTL_AN_EN@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
Lloh60:
	adrp	x9, _SPU_AN_CTL_XNP_EN@GOTPAGE
Lloh61:
	ldr	x9, [x9, _SPU_AN_CTL_XNP_EN@GOTPAGEOFF]
Lloh62:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w3, w0, w8
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh63:
	adrp	x26, _BGX_SPUX_AN_ADV@GOTPAGE
Lloh64:
	ldr	x26, [x26, _BGX_SPUX_AN_ADV@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
	ldr	x8, [x21, #8]
Lloh65:
	adrp	x9, _BGX_MODE_10G_KR@GOTPAGE
Lloh66:
	ldr	x9, [x9, _BGX_MODE_10G_KR@GOTPAGEOFF]
Lloh67:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	orr	w8, w0, #0x800000
	b	LBB0_9
LBB0_8:
Lloh68:
	adrp	x9, _BGX_MODE_40G_KR@GOTPAGE
Lloh69:
	ldr	x9, [x9, _BGX_MODE_40G_KR@GOTPAGEOFF]
Lloh70:
	ldr	x9, [x9]
	cmp	x8, x9
	and	w8, w0, #0xfe7fffff
	orr	w9, w0, #0x1000000
	csel	w8, w8, w9, ne
LBB0_9:
	mov	w9, #61439
	movk	w9, #64959, lsl #16
	and	w3, w8, w9
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh71:
	adrp	x21, _BGX_SPU_DBG_CONTROL@GOTPAGE
Lloh72:
	ldr	x21, [x21, _BGX_SPU_DBG_CONTROL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #0
	bl	_bgx_reg_read
Lloh73:
	adrp	x8, _SPU_DBG_CTL_AN_ARB_LINK_CHK_EN@GOTPAGE
Lloh74:
	ldr	x8, [x8, _SPU_DBG_CTL_AN_ARB_LINK_CHK_EN@GOTPAGEOFF]
Lloh75:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #0
	bl	_bgx_reg_write
	ldr	w2, [x23]
	ldr	w3, [x25]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_modify
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
	ldr	w8, [x24]
	bic	w3, w0, w8
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh76:
	adrp	x21, _BGX_SMUX_TX_CTL@GOTPAGE
Lloh77:
	ldr	x21, [x21, _BGX_SMUX_TX_CTL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
Lloh78:
	adrp	x8, _SMU_TX_CTL_UNI_EN@GOTPAGE
Lloh79:
	ldr	x8, [x8, _SMU_TX_CTL_UNI_EN@GOTPAGEOFF]
Lloh80:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh81:
	adrp	x9, _SMU_TX_CTL_DIC_EN@GOTPAGE
Lloh82:
	ldr	x9, [x9, _SMU_TX_CTL_DIC_EN@GOTPAGEOFF]
Lloh83:
	ldr	w9, [x9]
	orr	w3, w8, w9
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh84:
	adrp	x8, _BGX_SMUX_CBFC_CTL@GOTPAGE
Lloh85:
	ldr	x8, [x8, _BGX_SMUX_CBFC_CTL@GOTPAGEOFF]
Lloh86:
	ldr	w2, [x8]
Lloh87:
	adrp	x8, _BCK_EN@GOTPAGE
Lloh88:
	ldr	x8, [x8, _BCK_EN@GOTPAGEOFF]
Lloh89:
	ldr	w8, [x8]
Lloh90:
	adrp	x9, _DRP_EN@GOTPAGE
Lloh91:
	ldr	x9, [x9, _DRP_EN@GOTPAGEOFF]
Lloh92:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh93:
	adrp	x9, _TX_EN@GOTPAGE
Lloh94:
	ldr	x9, [x9, _TX_EN@GOTPAGEOFF]
Lloh95:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh96:
	adrp	x9, _RX_EN@GOTPAGE
Lloh97:
	ldr	x9, [x9, _RX_EN@GOTPAGEOFF]
Lloh98:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh99:
	adrp	x8, _BGX_SMUX_TX_PAUSE_PKT_TIME@GOTPAGE
Lloh100:
	ldr	x8, [x8, _BGX_SMUX_TX_PAUSE_PKT_TIME@GOTPAGEOFF]
Lloh101:
	ldr	w2, [x8]
Lloh102:
	adrp	x21, _DEFAULT_PAUSE_TIME@GOTPAGE
Lloh103:
	ldr	x21, [x21, _DEFAULT_PAUSE_TIME@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh104:
	adrp	x22, _BGX_SMUX_TX_PAUSE_PKT_INTERVAL@GOTPAGE
Lloh105:
	ldr	x22, [x22, _BGX_SMUX_TX_PAUSE_PKT_INTERVAL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_read
	and	w8, w0, #0xffff0000
	ldr	w2, [x22]
	ldr	w9, [x21]
	sub	w9, w9, #1, lsl #12             ; =4096
	orr	w3, w9, w8
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_write
Lloh106:
	adrp	x8, _BGX_SMUX_TX_PAUSE_ZERO@GOTPAGE
Lloh107:
	ldr	x8, [x8, _BGX_SMUX_TX_PAUSE_ZERO@GOTPAGEOFF]
Lloh108:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_bgx_reg_write
Lloh109:
	adrp	x8, _BGX_SMUX_TX_THRESH@GOTPAGE
Lloh110:
	ldr	x8, [x8, _BGX_SMUX_TX_THRESH@GOTPAGEOFF]
Lloh111:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #255
	bl	_bgx_reg_modify
Lloh112:
	adrp	x8, _BGX_SMUX_RX_JABBER@GOTPAGE
Lloh113:
	ldr	x8, [x8, _BGX_SMUX_RX_JABBER@GOTPAGEOFF]
Lloh114:
	ldr	w2, [x8]
Lloh115:
	adrp	x8, _MAX_FRAME_SIZE@GOTPAGE
Lloh116:
	ldr	x8, [x8, _MAX_FRAME_SIZE@GOTPAGEOFF]
Lloh117:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_bgx_reg_modify
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh115, Lloh116, Lloh117
	.loh AdrpLdrGotLdr	Lloh112, Lloh113, Lloh114
	.loh AdrpLdrGotLdr	Lloh109, Lloh110, Lloh111
	.loh AdrpLdrGotLdr	Lloh106, Lloh107, Lloh108
	.loh AdrpLdrGot	Lloh104, Lloh105
	.loh AdrpLdrGot	Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh71, Lloh72
	.cfi_endproc
                                        ; -- End function
	.comm	_BGX_SPUX_CONTROL1,4,2          ; @BGX_SPUX_CONTROL1
	.comm	_SPU_CTL_RESET,4,2              ; @SPU_CTL_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BGX SPU reset not completed\n"

	.comm	_BGX_CMRX_CFG,4,2               ; @BGX_CMRX_CFG
	.comm	_CMR_EN,4,2                     ; @CMR_EN
	.comm	_SPU_CTL_LOW_POWER,4,2          ; @SPU_CTL_LOW_POWER
	.comm	_BGX_MODE_RXAUI,8,3             ; @BGX_MODE_RXAUI
	.comm	_BGX_SPUX_MISC_CONTROL,4,2      ; @BGX_SPUX_MISC_CONTROL
	.comm	_SPU_MISC_CTL_INTLV_RDISP,4,2   ; @SPU_MISC_CTL_INTLV_RDISP
	.comm	_SPU_MISC_CTL_RX_DIS,4,2        ; @SPU_MISC_CTL_RX_DIS
	.comm	_BGX_SMUX_RX_INT,4,2            ; @BGX_SMUX_RX_INT
	.comm	_BGX_SMUX_TX_INT,4,2            ; @BGX_SMUX_TX_INT
	.comm	_BGX_SPUX_INT,4,2               ; @BGX_SPUX_INT
	.comm	_BGX_SPUX_BR_PMD_LP_CUP,4,2     ; @BGX_SPUX_BR_PMD_LP_CUP
	.comm	_BGX_SPUX_BR_PMD_LD_CUP,4,2     ; @BGX_SPUX_BR_PMD_LD_CUP
	.comm	_BGX_SPUX_BR_PMD_LD_REP,4,2     ; @BGX_SPUX_BR_PMD_LD_REP
	.comm	_BGX_SPUX_BR_PMD_CRTL,4,2       ; @BGX_SPUX_BR_PMD_CRTL
	.comm	_SPU_PMD_CRTL_TRAIN_EN,4,2      ; @SPU_PMD_CRTL_TRAIN_EN
	.comm	_BGX_SMUX_TX_APPEND,4,2         ; @BGX_SMUX_TX_APPEND
	.comm	_SMU_TX_APPEND_FCS_D,4,2        ; @SMU_TX_APPEND_FCS_D
	.comm	_BGX_SPUX_FEC_CONTROL,4,2       ; @BGX_SPUX_FEC_CONTROL
	.comm	_SPU_FEC_CTL_FEC_EN,4,2         ; @SPU_FEC_CTL_FEC_EN
	.comm	_BGX_SPUX_AN_CONTROL,4,2        ; @BGX_SPUX_AN_CONTROL
	.comm	_SPU_AN_CTL_AN_EN,4,2           ; @SPU_AN_CTL_AN_EN
	.comm	_SPU_AN_CTL_XNP_EN,4,2          ; @SPU_AN_CTL_XNP_EN
	.comm	_BGX_SPUX_AN_ADV,4,2            ; @BGX_SPUX_AN_ADV
	.comm	_BGX_MODE_10G_KR,8,3            ; @BGX_MODE_10G_KR
	.comm	_BGX_MODE_40G_KR,8,3            ; @BGX_MODE_40G_KR
	.comm	_BGX_SPU_DBG_CONTROL,4,2        ; @BGX_SPU_DBG_CONTROL
	.comm	_SPU_DBG_CTL_AN_ARB_LINK_CHK_EN,4,2 ; @SPU_DBG_CTL_AN_ARB_LINK_CHK_EN
	.comm	_BGX_SMUX_TX_CTL,4,2            ; @BGX_SMUX_TX_CTL
	.comm	_SMU_TX_CTL_UNI_EN,4,2          ; @SMU_TX_CTL_UNI_EN
	.comm	_SMU_TX_CTL_DIC_EN,4,2          ; @SMU_TX_CTL_DIC_EN
	.comm	_BGX_SMUX_CBFC_CTL,4,2          ; @BGX_SMUX_CBFC_CTL
	.comm	_BCK_EN,4,2                     ; @BCK_EN
	.comm	_DRP_EN,4,2                     ; @DRP_EN
	.comm	_TX_EN,4,2                      ; @TX_EN
	.comm	_RX_EN,4,2                      ; @RX_EN
	.comm	_BGX_SMUX_TX_PAUSE_PKT_TIME,4,2 ; @BGX_SMUX_TX_PAUSE_PKT_TIME
	.comm	_DEFAULT_PAUSE_TIME,4,2         ; @DEFAULT_PAUSE_TIME
	.comm	_BGX_SMUX_TX_PAUSE_PKT_INTERVAL,4,2 ; @BGX_SMUX_TX_PAUSE_PKT_INTERVAL
	.comm	_BGX_SMUX_TX_PAUSE_ZERO,4,2     ; @BGX_SMUX_TX_PAUSE_ZERO
	.comm	_BGX_SMUX_TX_THRESH,4,2         ; @BGX_SMUX_TX_THRESH
	.comm	_BGX_SMUX_RX_JABBER,4,2         ; @BGX_SMUX_RX_JABBER
	.comm	_MAX_FRAME_SIZE,4,2             ; @MAX_FRAME_SIZE
	.no_dead_strip	_bgx_lmac_xaui_init
.subsections_via_symbols
