	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_enet_reset
_xgene_enet_reset:                      ## @xgene_enet_reset
	.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, %r14
	movq	16(%rdi), %rbx
	callq	_xgene_ring_mgr_init
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpq	$0, 32(%r14)
	movq	(%r14), %rax
	movq	_XGENE_ENET2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	je	LBB0_5
## %bb.3:
	cmpq	%rcx, %rax
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_xgene_enet_config_ring_if_assoc
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_5:
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.6:
	movq	_XGENET_CONFIG_REG_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SGMII_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_xgene_enet_wr_clkrst_csr
LBB0_7:
	cmpq	$0, (%rbx)
	je	LBB0_10
## %bb.8:
	movl	24(%r14), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movl	24(%r14), %edi
	callq	_clk_prepare_enable
	movl	$5, %edi
	callq	_udelay
	movl	24(%r14), %edi
	callq	_clk_disable_unprepare
	movl	$5, %edi
	callq	_udelay
	movl	24(%r14), %edi
	callq	_clk_prepare_enable
	movl	$5, %edi
	callq	_udelay
LBB0_10:
	xorl	%ebx, %ebx
	cmpl	$0, 8(%r14)
	jne	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_xgene_enet_ecc_init
	movq	%r14, %rdi
	callq	_xgene_enet_config_ring_if_assoc
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_XGENE_ENET2,8,3                ## @XGENE_ENET2
	.comm	_XGENET_CONFIG_REG_ADDR,4,2     ## @XGENET_CONFIG_REG_ADDR
	.comm	_SGMII_EN,4,2                   ## @SGMII_EN
	.no_dead_strip	_xgene_enet_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_enet_reset
_xgene_enet_reset:                      ; @xgene_enet_reset
	.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, #16]
	bl	_xgene_ring_mgr_init
	cbz	w0, LBB0_7
; %bb.1:
	ldr	x10, [x19, #32]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _XGENE_ENET2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XGENE_ENET2@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x10, #0
	ccmp	x8, x9, #0, ne
	b.eq	LBB0_10
; %bb.2:
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _XGENET_CONFIG_REG_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XGENET_CONFIG_REG_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SGMII_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SGMII_EN@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_xgene_enet_wr_clkrst_csr
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x19, #24]
	bl	_IS_ERR
	cbz	w0, LBB0_8
LBB0_6:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_11
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_8:
	ldr	w0, [x19, #24]
	bl	_clk_prepare_enable
	mov	w0, #5
	bl	_udelay
	ldr	w0, [x19, #24]
	bl	_clk_disable_unprepare
	mov	w0, #5
	bl	_udelay
	ldr	w0, [x19, #24]
	bl	_clk_prepare_enable
	mov	w0, #5
	bl	_udelay
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_xgene_enet_ecc_init
LBB0_10:
	mov	x0, x19
	bl	_xgene_enet_config_ring_if_assoc
LBB0_11:
	mov	w0, #0
LBB0_12:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_XGENE_ENET2,8,3                ; @XGENE_ENET2
	.comm	_XGENET_CONFIG_REG_ADDR,4,2     ; @XGENET_CONFIG_REG_ADDR
	.comm	_SGMII_EN,4,2                   ; @SGMII_EN
	.no_dead_strip	_xgene_enet_reset
.subsections_via_symbols
