	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_gmac_init
_xgene_gmac_init:                       ## @xgene_gmac_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$0, 8(%rdi)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_xgene_gmac_reset
LBB0_2:
	movq	%rbx, %rdi
	callq	_xgene_gmac_set_speed
	movq	%rbx, %rdi
	callq	_xgene_gmac_set_mac_addr
	movq	_MII_MGMT_CONFIG_ADDR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_xgene_enet_rd_mac
	movl	%eax, -28(%rbp)
	leaq	-28(%rbp), %r14
	movq	%r14, %rdi
	movl	$7, %esi
	callq	_MGMT_CLOCK_SEL_SET
	movl	(%r15), %esi
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_xgene_enet_wr_mac
	movq	_RSIF_CONFIG_REG_ADDR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_xgene_enet_rd_csr
	movq	_CFG_RSIF_FPBUFF_TIMEOUT_EN@GOTPCREL(%rip), %rax
	movl	-28(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_xgene_enet_wr_csr
	movq	_RSIF_RAM_DBG_REG0_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_xgene_enet_wr_csr
	movq	_CSR_MULTI_DPF0_ADDR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_xgene_enet_rd_mcx_csr
	movq	_DEF_QUANTA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$16, %eax
	movzwl	-28(%rbp), %edx
	orl	%eax, %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_xgene_enet_wr_mcx_csr
	movq	_RXBUF_PAUSE_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DEF_PAUSE_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_xgene_enet_wr_csr
	movq	_RXBUF_PAUSE_OFF_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DEF_PAUSE_OFF_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_xgene_enet_wr_csr
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_xgene_gmac_flowctl_tx
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_xgene_gmac_flowctl_rx
	movq	_CFG_LINK_AGGR_RESUME_0_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TX_PORT0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_xgene_enet_wr_csr
	movq	_RX_DV_GATE_REG_0_ADDR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_xgene_enet_rd_mcx_csr
	movq	_TX_DV_GATE_EN0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_RX_DV_GATE_EN0@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	notl	%edx
	andl	-28(%rbp), %edx
	movq	_RESUME_RX0@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_xgene_enet_wr_mcx_csr
	movq	_CFG_BYPASS_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RESUME_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_xgene_enet_wr_csr
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_MGMT_CONFIG_ADDR,4,2       ## @MII_MGMT_CONFIG_ADDR
	.comm	_RSIF_CONFIG_REG_ADDR,4,2       ## @RSIF_CONFIG_REG_ADDR
	.comm	_CFG_RSIF_FPBUFF_TIMEOUT_EN,4,2 ## @CFG_RSIF_FPBUFF_TIMEOUT_EN
	.comm	_RSIF_RAM_DBG_REG0_ADDR,4,2     ## @RSIF_RAM_DBG_REG0_ADDR
	.comm	_CSR_MULTI_DPF0_ADDR,4,2        ## @CSR_MULTI_DPF0_ADDR
	.comm	_DEF_QUANTA,4,2                 ## @DEF_QUANTA
	.comm	_RXBUF_PAUSE_THRESH,4,2         ## @RXBUF_PAUSE_THRESH
	.comm	_DEF_PAUSE_THRES,4,2            ## @DEF_PAUSE_THRES
	.comm	_RXBUF_PAUSE_OFF_THRESH,4,2     ## @RXBUF_PAUSE_OFF_THRESH
	.comm	_DEF_PAUSE_OFF_THRES,4,2        ## @DEF_PAUSE_OFF_THRES
	.comm	_CFG_LINK_AGGR_RESUME_0_ADDR,4,2 ## @CFG_LINK_AGGR_RESUME_0_ADDR
	.comm	_TX_PORT0,4,2                   ## @TX_PORT0
	.comm	_RX_DV_GATE_REG_0_ADDR,4,2      ## @RX_DV_GATE_REG_0_ADDR
	.comm	_TX_DV_GATE_EN0,4,2             ## @TX_DV_GATE_EN0
	.comm	_RX_DV_GATE_EN0,4,2             ## @RX_DV_GATE_EN0
	.comm	_RESUME_RX0,4,2                 ## @RESUME_RX0
	.comm	_CFG_BYPASS_ADDR,4,2            ## @CFG_BYPASS_ADDR
	.comm	_RESUME_TX,4,2                  ## @RESUME_TX
	.no_dead_strip	_xgene_gmac_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_gmac_init
_xgene_gmac_init:                       ; @xgene_gmac_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0, #8]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_xgene_gmac_reset
LBB0_2:
	mov	x0, x19
	bl	_xgene_gmac_set_speed
	mov	x0, x19
	bl	_xgene_gmac_set_mac_addr
Lloh0:
	adrp	x20, _MII_MGMT_CONFIG_ADDR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MII_MGMT_CONFIG_ADDR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	str	w0, [sp, #12]
	add	x0, sp, #12
	mov	w1, #7
	bl	_MGMT_CLOCK_SEL_SET
	ldr	w1, [x20]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_xgene_enet_wr_mac
Lloh2:
	adrp	x20, _RSIF_CONFIG_REG_ADDR@GOTPAGE
Lloh3:
	ldr	x20, [x20, _RSIF_CONFIG_REG_ADDR@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_xgene_enet_rd_csr
Lloh4:
	adrp	x8, _CFG_RSIF_FPBUFF_TIMEOUT_EN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CFG_RSIF_FPBUFF_TIMEOUT_EN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_wr_csr
Lloh7:
	adrp	x8, _RSIF_RAM_DBG_REG0_ADDR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RSIF_RAM_DBG_REG0_ADDR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_xgene_enet_wr_csr
Lloh10:
	adrp	x20, _CSR_MULTI_DPF0_ADDR@GOTPAGE
Lloh11:
	ldr	x20, [x20, _CSR_MULTI_DPF0_ADDR@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_xgene_enet_rd_mcx_csr
Lloh12:
	adrp	x8, _DEF_QUANTA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DEF_QUANTA@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldrh	w2, [sp, #12]
	bfi	w2, w8, #16, #16
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_wr_mcx_csr
Lloh15:
	adrp	x8, _RXBUF_PAUSE_THRESH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RXBUF_PAUSE_THRESH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _DEF_PAUSE_THRES@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DEF_PAUSE_THRES@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_xgene_enet_wr_csr
Lloh21:
	adrp	x8, _RXBUF_PAUSE_OFF_THRESH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RXBUF_PAUSE_OFF_THRESH@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _DEF_PAUSE_OFF_THRES@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DEF_PAUSE_OFF_THRES@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_xgene_enet_wr_csr
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_xgene_gmac_flowctl_tx
	ldr	w1, [x19]
	mov	x0, x19
	bl	_xgene_gmac_flowctl_rx
Lloh27:
	adrp	x8, _CFG_LINK_AGGR_RESUME_0_ADDR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CFG_LINK_AGGR_RESUME_0_ADDR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _TX_PORT0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _TX_PORT0@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_xgene_enet_wr_csr
Lloh33:
	adrp	x20, _RX_DV_GATE_REG_0_ADDR@GOTPAGE
Lloh34:
	ldr	x20, [x20, _RX_DV_GATE_REG_0_ADDR@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_xgene_enet_rd_mcx_csr
Lloh35:
	adrp	x8, _TX_DV_GATE_EN0@GOTPAGE
Lloh36:
	ldr	x8, [x8, _TX_DV_GATE_EN0@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
Lloh38:
	adrp	x10, _RX_DV_GATE_EN0@GOTPAGE
Lloh39:
	ldr	x10, [x10, _RX_DV_GATE_EN0@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	orr	w8, w8, w10
	bic	w8, w9, w8
Lloh41:
	adrp	x9, _RESUME_RX0@GOTPAGE
Lloh42:
	ldr	x9, [x9, _RESUME_RX0@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_wr_mcx_csr
Lloh44:
	adrp	x8, _CFG_BYPASS_ADDR@GOTPAGE
Lloh45:
	ldr	x8, [x8, _CFG_BYPASS_ADDR@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
Lloh47:
	adrp	x8, _RESUME_TX@GOTPAGE
Lloh48:
	ldr	x8, [x8, _RESUME_TX@GOTPAGEOFF]
Lloh49:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_xgene_enet_wr_csr
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_MGMT_CONFIG_ADDR,4,2       ; @MII_MGMT_CONFIG_ADDR
	.comm	_RSIF_CONFIG_REG_ADDR,4,2       ; @RSIF_CONFIG_REG_ADDR
	.comm	_CFG_RSIF_FPBUFF_TIMEOUT_EN,4,2 ; @CFG_RSIF_FPBUFF_TIMEOUT_EN
	.comm	_RSIF_RAM_DBG_REG0_ADDR,4,2     ; @RSIF_RAM_DBG_REG0_ADDR
	.comm	_CSR_MULTI_DPF0_ADDR,4,2        ; @CSR_MULTI_DPF0_ADDR
	.comm	_DEF_QUANTA,4,2                 ; @DEF_QUANTA
	.comm	_RXBUF_PAUSE_THRESH,4,2         ; @RXBUF_PAUSE_THRESH
	.comm	_DEF_PAUSE_THRES,4,2            ; @DEF_PAUSE_THRES
	.comm	_RXBUF_PAUSE_OFF_THRESH,4,2     ; @RXBUF_PAUSE_OFF_THRESH
	.comm	_DEF_PAUSE_OFF_THRES,4,2        ; @DEF_PAUSE_OFF_THRES
	.comm	_CFG_LINK_AGGR_RESUME_0_ADDR,4,2 ; @CFG_LINK_AGGR_RESUME_0_ADDR
	.comm	_TX_PORT0,4,2                   ; @TX_PORT0
	.comm	_RX_DV_GATE_REG_0_ADDR,4,2      ; @RX_DV_GATE_REG_0_ADDR
	.comm	_TX_DV_GATE_EN0,4,2             ; @TX_DV_GATE_EN0
	.comm	_RX_DV_GATE_EN0,4,2             ; @RX_DV_GATE_EN0
	.comm	_RESUME_RX0,4,2                 ; @RESUME_RX0
	.comm	_CFG_BYPASS_ADDR,4,2            ; @CFG_BYPASS_ADDR
	.comm	_RESUME_TX,4,2                  ; @RESUME_TX
	.no_dead_strip	_xgene_gmac_init
.subsections_via_symbols
