	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gbe_slave_open
_gbe_slave_open:                        ## @gbe_slave_open
	.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	%rdi, %r15
	movq	8(%rdi), %rbx
	movq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_IS_SS_ID_2U
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_gbe_sgmii_config
LBB0_2:
	movq	%rbx, %rdi
	callq	_gbe_port_reset
	movq	%r14, %rdi
	callq	_IS_SS_ID_2U
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_gbe_sgmii_rtreset
LBB0_4:
	movl	8(%r14), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_gbe_port_config
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_gbe_set_slave_mac
	movq	%r14, %rdi
	callq	_IS_SS_ID_MU
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_HOST_TX_PRI_MAP_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_port_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_rx_pri_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_GBE_REG_ADDR
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_writel
LBB0_6:
	movl	4(%r14), %edi
	movl	(%rbx), %esi
	movq	_ALE_PORT_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ALE_PORT_STATE_FORWARD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_cpsw_ale_control_set
	movl	4(%r14), %edi
	movb	(%rbx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	(%r15), %rax
	movl	(%rax), %esi
	movq	_ALE_MCAST_FWD_2@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_cpsw_ale_add_mcast
	movq	8(%rbx), %rax
	movq	_SGMII_LINK_MAC_PHY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_PHY_INTERFACE_MODE_SGMII@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_PORT_MII@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_8:
	movq	_RGMII_LINK_MAC_PHY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.9:
	movl	40(%rbx), %edi
	callq	_of_get_phy_mode
	movq	%rax, %r12
	testq	%rax, %rax
	jns	LBB0_11
## %bb.10:
	movq	_PHY_INTERFACE_MODE_RGMII@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_11:
	movq	%r12, %rdi
	callq	_phy_interface_mode_is_rgmii
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	_PORT_MII@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_XGMII_LINK_MAC_PHY@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.16:
	movq	_PHY_INTERFACE_MODE_NA@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_PORT_FIBRE@GOTPCREL(%rip), %rax
LBB0_17:
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	%r14, %rdi
	callq	_IS_SS_ID_XGBE
	testq	%rax, %rax
	jne	LBB0_18
## %bb.19:
	movq	_gbe_adjust_link@GOTPCREL(%rip), %rdx
	jmp	LBB0_20
LBB0_18:
	movq	_xgbe_adjust_link@GOTPCREL(%rip), %rdx
LBB0_20:
	movq	(%r15), %rdi
	movl	28(%rbx), %esi
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	movq	%r12, %r8
	callq	_of_phy_connect
	movl	%eax, 24(%rbx)
	movl	(%r14), %r14d
	testl	%eax, %eax
	je	LBB0_21
## %bb.22:
	movl	%eax, %edi
	callq	_phydev_name
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_dev_dbg
	movl	24(%rbx), %edi
	callq	_phy_start
	jmp	LBB0_23
LBB0_21:
	movq	16(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_14:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_23:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST_TX_PRI_MAP_DEFAULT,4,2    ## @HOST_TX_PRI_MAP_DEFAULT
	.comm	_port_regs,4,2                  ## @port_regs
	.comm	_rx_pri_map,4,2                 ## @rx_pri_map
	.comm	_ALE_PORT_STATE,4,2             ## @ALE_PORT_STATE
	.comm	_ALE_PORT_STATE_FORWARD,4,2     ## @ALE_PORT_STATE_FORWARD
	.comm	_ALE_MCAST_FWD_2,4,2            ## @ALE_MCAST_FWD_2
	.comm	_SGMII_LINK_MAC_PHY,8,3         ## @SGMII_LINK_MAC_PHY
	.comm	_PHY_INTERFACE_MODE_SGMII,8,3   ## @PHY_INTERFACE_MODE_SGMII
	.comm	_PORT_MII,8,3                   ## @PORT_MII
	.comm	_RGMII_LINK_MAC_PHY,8,3         ## @RGMII_LINK_MAC_PHY
	.comm	_PHY_INTERFACE_MODE_RGMII,8,3   ## @PHY_INTERFACE_MODE_RGMII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported phy mode %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XGMII_LINK_MAC_PHY,8,3         ## @XGMII_LINK_MAC_PHY
	.comm	_PHY_INTERFACE_MODE_NA,8,3      ## @PHY_INTERFACE_MODE_NA
	.comm	_PORT_FIBRE,8,3                 ## @PORT_FIBRE
L_.str.1:                               ## @.str.1
	.asciz	"phy not found on slave %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"phy found: id is: 0x%s\n"

	.no_dead_strip	_gbe_slave_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gbe_slave_open
_gbe_slave_open:                        ; @gbe_slave_open
	.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	x21, x0
	ldp	x19, x20, [x0, #8]
	mov	x0, x20
	bl	_IS_SS_ID_2U
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_gbe_sgmii_config
LBB0_2:
	mov	x0, x19
	bl	_gbe_port_reset
	mov	x0, x20
	bl	_IS_SS_ID_2U
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_gbe_sgmii_rtreset
LBB0_4:
	ldr	w2, [x20, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_gbe_port_config
	mov	x0, x19
	mov	x1, x21
	bl	_gbe_set_slave_mac
	mov	x0, x20
	bl	_IS_SS_ID_MU
	cbz	x0, LBB0_6
; %bb.5:
Lloh0:
	adrp	x8, _HOST_TX_PRI_MAP_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HOST_TX_PRI_MAP_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _port_regs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _port_regs@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _rx_pri_map@GOTPAGE
Lloh7:
	ldr	x8, [x8, _rx_pri_map@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_GBE_REG_ADDR
	mov	x1, x0
	mov	x0, x22
	bl	_writel
LBB0_6:
	ldr	w0, [x20, #4]
	ldr	w1, [x19]
Lloh9:
	adrp	x8, _ALE_PORT_STATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ALE_PORT_STATE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _ALE_PORT_STATE_FORWARD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ALE_PORT_STATE_FORWARD@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	bl	_cpsw_ale_control_set
	ldr	w0, [x20, #4]
	ldr	x8, [x21]
	ldr	w1, [x8]
	ldr	w8, [x19]
	mov	w9, #1
	lsl	w2, w9, w8
Lloh15:
	adrp	x8, _ALE_MCAST_FWD_2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ALE_MCAST_FWD_2@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
	mov	w3, #0
	mov	w4, #0
	bl	_cpsw_ale_add_mcast
	ldr	x8, [x19, #8]
Lloh18:
	adrp	x9, _SGMII_LINK_MAC_PHY@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SGMII_LINK_MAC_PHY@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
Lloh21:
	adrp	x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGEOFF]
Lloh23:
	ldr	x22, [x8]
	b	LBB0_10
LBB0_8:
Lloh24:
	adrp	x9, _RGMII_LINK_MAC_PHY@GOTPAGE
Lloh25:
	ldr	x9, [x9, _RGMII_LINK_MAC_PHY@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.9:
	ldr	w0, [x19, #40]
	bl	_of_get_phy_mode
Lloh27:
	adrp	x8, _PHY_INTERFACE_MODE_RGMII@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_RGMII@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x22, x8, x0, lt
	mov	x0, x22
	bl	_phy_interface_mode_is_rgmii
	cbz	w0, LBB0_17
LBB0_10:
Lloh30:
	adrp	x8, _PORT_MII@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PORT_MII@GOTPAGEOFF]
LBB0_11:
	ldr	x8, [x8]
	str	x8, [x19, #32]
	mov	x0, x20
	bl	_IS_SS_ID_XGBE
Lloh32:
	adrp	x8, _xgbe_adjust_link@GOTPAGE
Lloh33:
	ldr	x8, [x8, _xgbe_adjust_link@GOTPAGEOFF]
Lloh34:
	adrp	x9, _gbe_adjust_link@GOTPAGE
Lloh35:
	ldr	x9, [x9, _gbe_adjust_link@GOTPAGEOFF]
	cmp	x0, #0
	csel	x2, x9, x8, eq
	ldr	x0, [x21]
	ldr	w1, [x19, #28]
	mov	w3, #0
	mov	x4, x22
	bl	_of_phy_connect
	str	w0, [x19, #24]
	ldr	w20, [x20]
	cbz	w0, LBB0_14
; %bb.12:
	bl	_phydev_name
	mov	x2, x0
Lloh36:
	adrp	x1, l_.str.2@PAGE
Lloh37:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	w0, [x19, #24]
	bl	_phy_start
LBB0_13:
	mov	w0, #0
	b	LBB0_19
LBB0_14:
	ldr	x2, [x19, #16]
Lloh38:
	adrp	x1, l_.str.1@PAGE
Lloh39:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh40:
	adrp	x8, _ENODEV@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_18
LBB0_15:
Lloh42:
	adrp	x9, _XGMII_LINK_MAC_PHY@GOTPAGE
Lloh43:
	ldr	x9, [x9, _XGMII_LINK_MAC_PHY@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.16:
Lloh45:
	adrp	x8, _PHY_INTERFACE_MODE_NA@GOTPAGE
Lloh46:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_NA@GOTPAGEOFF]
Lloh47:
	ldr	x22, [x8]
Lloh48:
	adrp	x8, _PORT_FIBRE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _PORT_FIBRE@GOTPAGEOFF]
	b	LBB0_11
LBB0_17:
	ldr	w0, [x20]
Lloh50:
	adrp	x1, l_.str@PAGE
Lloh51:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
Lloh52:
	adrp	x8, _EINVAL@GOTPAGE
Lloh53:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST_TX_PRI_MAP_DEFAULT,4,2    ; @HOST_TX_PRI_MAP_DEFAULT
	.comm	_port_regs,4,2                  ; @port_regs
	.comm	_rx_pri_map,4,2                 ; @rx_pri_map
	.comm	_ALE_PORT_STATE,4,2             ; @ALE_PORT_STATE
	.comm	_ALE_PORT_STATE_FORWARD,4,2     ; @ALE_PORT_STATE_FORWARD
	.comm	_ALE_MCAST_FWD_2,4,2            ; @ALE_MCAST_FWD_2
	.comm	_SGMII_LINK_MAC_PHY,8,3         ; @SGMII_LINK_MAC_PHY
	.comm	_PHY_INTERFACE_MODE_SGMII,8,3   ; @PHY_INTERFACE_MODE_SGMII
	.comm	_PORT_MII,8,3                   ; @PORT_MII
	.comm	_RGMII_LINK_MAC_PHY,8,3         ; @RGMII_LINK_MAC_PHY
	.comm	_PHY_INTERFACE_MODE_RGMII,8,3   ; @PHY_INTERFACE_MODE_RGMII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported phy mode %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XGMII_LINK_MAC_PHY,8,3         ; @XGMII_LINK_MAC_PHY
	.comm	_PHY_INTERFACE_MODE_NA,8,3      ; @PHY_INTERFACE_MODE_NA
	.comm	_PORT_FIBRE,8,3                 ; @PORT_FIBRE
l_.str.1:                               ; @.str.1
	.asciz	"phy not found on slave %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"phy found: id is: 0x%s\n"

	.no_dead_strip	_gbe_slave_open
.subsections_via_symbols
