	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocelot_port_open
_ocelot_port_open:                      ## @ocelot_port_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	24(%rax), %r15
	movq	_ANA_PORT_PORT_CFG_LEARNAUTO@GOTPCREL(%rip), %rax
	movq	_ANA_PORT_PORT_CFG_RECV_ENA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movl	16(%r12), %edi
	callq	_ANA_PORT_PORT_CFG_PORTID_VAL
	orl	%eax, %ebx
	movq	_ANA_PORT_PORT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	16(%r12), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ocelot_write_gix
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	_PHY_MODE_ETHERNET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	callq	_phy_set_mode_ext
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	movl	(%r12), %esi
	movl	4(%r12), %ecx
	movq	_ocelot_port_adjust_link@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	callq	_phy_connect_direct
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movq	%r14, %rdi
	callq	_netdev_err
	jmp	LBB0_7
LBB0_6:
	movl	(%r12), %edi
	movl	%edi, (%r14)
	callq	_phy_attached_info
	movl	(%r12), %edi
	callq	_phy_start
	xorl	%r15d, %r15d
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ANA_PORT_PORT_CFG_LEARNAUTO,4,2 ## @ANA_PORT_PORT_CFG_LEARNAUTO
	.comm	_ANA_PORT_PORT_CFG_RECV_ENA,4,2 ## @ANA_PORT_PORT_CFG_RECV_ENA
	.comm	_ANA_PORT_PORT_CFG,4,2          ## @ANA_PORT_PORT_CFG
	.comm	_PHY_MODE_ETHERNET,4,2          ## @PHY_MODE_ETHERNET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not set mode of SerDes\n"

	.comm	_ocelot_port_adjust_link,4,2    ## @ocelot_port_adjust_link
L_.str.1:                               ## @.str.1
	.asciz	"Could not attach to PHY\n"

	.no_dead_strip	_ocelot_port_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocelot_port_open
_ocelot_port_open:                      ; @ocelot_port_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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x21, [x0, #24]
Lloh0:
	adrp	x8, _ANA_PORT_PORT_CFG_LEARNAUTO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ANA_PORT_PORT_CFG_LEARNAUTO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ANA_PORT_PORT_CFG_RECV_ENA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ANA_PORT_PORT_CFG_RECV_ENA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w22, w9, w8
	ldr	w0, [x0, #16]
	bl	_ANA_PORT_PORT_CFG_PORTID_VAL
	orr	w1, w22, w0
Lloh6:
	adrp	x8, _ANA_PORT_PORT_CFG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ANA_PORT_PORT_CFG@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldr	w3, [x20, #16]
	mov	x0, x21
	bl	_ocelot_write_gix
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_3
; %bb.1:
Lloh9:
	adrp	x8, _PHY_MODE_ETHERNET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PHY_MODE_ETHERNET@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	bl	_phy_set_mode_ext
	cbz	w0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
	ldp	w1, w3, [x20]
Lloh14:
	adrp	x2, _ocelot_port_adjust_link@GOTPAGE
Lloh15:
	ldr	x2, [x2, _ocelot_port_adjust_link@GOTPAGEOFF]
	mov	x0, x19
	bl	_phy_connect_direct
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.4:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_7
LBB0_6:
	ldr	w0, [x20]
	str	w0, [x19]
	bl	_phy_attached_info
	ldr	w0, [x20]
	bl	_phy_start
LBB0_7:
	mov	x0, x21
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ANA_PORT_PORT_CFG_LEARNAUTO,4,2 ; @ANA_PORT_PORT_CFG_LEARNAUTO
	.comm	_ANA_PORT_PORT_CFG_RECV_ENA,4,2 ; @ANA_PORT_PORT_CFG_RECV_ENA
	.comm	_ANA_PORT_PORT_CFG,4,2          ; @ANA_PORT_PORT_CFG
	.comm	_PHY_MODE_ETHERNET,4,2          ; @PHY_MODE_ETHERNET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not set mode of SerDes\n"

	.comm	_ocelot_port_adjust_link,4,2    ; @ocelot_port_adjust_link
l_.str.1:                               ; @.str.1
	.asciz	"Could not attach to PHY\n"

	.no_dead_strip	_ocelot_port_open
.subsections_via_symbols
