	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function port_start
_port_start:                            ## @port_start
	.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, %r14
	cmpq	$0, 32(%rdi)
	je	LBB0_2
## %bb.1:
	movl	16(%r14), %edi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_mv643xx_eth_get_settings
	movq	%r14, %rdi
	callq	_phy_reset
	movl	16(%r14), %edi
	movq	%rbx, %rsi
	callq	_mv643xx_eth_set_settings
LBB0_2:
	movq	_PORT_SERIAL_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_rdlp
	movl	%eax, %ebx
	movq	_SERIAL_PORT_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_wrlp
	movq	_DO_NOT_FORCE_LINK_FAIL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	xorl	%eax, %eax
	cmpq	$0, 32(%r14)
	jne	LBB0_4
## %bb.3:
	movq	_FORCE_LINK_PASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	orl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_wrlp
	movq	%r14, %rdi
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	movl	$16777216, %edx                 ## imm = 0x1000000
	callq	_tx_set_rate
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.5:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rbx
	addq	%r15, %rbx
	movq	%rbx, %rdi
	callq	_txq_reset_hw_ptr
	movq	%rbx, %rdi
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	movl	$16777216, %edx                 ## imm = 0x1000000
	callq	_txq_set_rate
	movq	%rbx, %rdi
	callq	_txq_set_fixed_prio_mode
	incq	%r12
	movslq	(%r14), %rax
	addq	$4, %r15
	cmpq	%rax, %r12
	jl	LBB0_6
LBB0_7:
	movq	_PORT_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$33554432, %edx                 ## imm = 0x2000000
	callq	_wrlp
	movq	_PORT_CONFIG_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_wrlp
	movl	16(%r14), %edi
	callq	_mv643xx_eth_program_unicast_filter
	cmpl	$0, 4(%r14)
	jle	LBB0_10
## %bb.8:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	leaq	(%rax,%r13), %r15
	movl	(%rax,%r13), %ebx
	shll	$2, %ebx
	addl	8(%rax,%r13), %ebx
	movl	%r12d, %edi
	callq	_RXQ_CURRENT_DESC_PTR
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_wrlp
	movq	%r15, %rdi
	callq	_rxq_enable
	incq	%r12
	movslq	4(%r14), %rax
	addq	$16, %r13
	cmpq	%rax, %r12
	jl	LBB0_9
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_SERIAL_CONTROL,4,2        ## @PORT_SERIAL_CONTROL
	.comm	_SERIAL_PORT_ENABLE,4,2         ## @SERIAL_PORT_ENABLE
	.comm	_DO_NOT_FORCE_LINK_FAIL,4,2     ## @DO_NOT_FORCE_LINK_FAIL
	.comm	_FORCE_LINK_PASS,4,2            ## @FORCE_LINK_PASS
	.comm	_PORT_CONFIG,4,2                ## @PORT_CONFIG
	.comm	_PORT_CONFIG_EXT,4,2            ## @PORT_CONFIG_EXT
	.no_dead_strip	_port_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function port_start
_port_start:                            ; @port_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	add	x1, sp, #8
	bl	_mv643xx_eth_get_settings
	mov	x0, x19
	bl	_phy_reset
	ldr	w0, [x19, #16]
	add	x1, sp, #8
	bl	_mv643xx_eth_set_settings
LBB0_2:
Lloh0:
	adrp	x21, _PORT_SERIAL_CONTROL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PORT_SERIAL_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rdlp
Lloh2:
	adrp	x8, _SERIAL_PORT_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SERIAL_PORT_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w20, w8, w0
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_wrlp
Lloh5:
	adrp	x8, _DO_NOT_FORCE_LINK_FAIL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DO_NOT_FORCE_LINK_FAIL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w8, w8, w20
Lloh8:
	adrp	x9, _FORCE_LINK_PASS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FORCE_LINK_PASS@GOTPAGEOFF]
	ldr	x10, [x19, #32]
Lloh10:
	ldr	w9, [x9]
	cmp	x10, #0
	csel	w9, w9, wzr, eq
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x19
	bl	_wrlp
	mov	x0, x19
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	mov	w2, #16777216
	bl	_tx_set_rate
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, #0
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	add	x20, x8, x21
	mov	x0, x20
	bl	_txq_reset_hw_ptr
	mov	x0, x20
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	mov	w2, #16777216
	bl	_txq_set_rate
	mov	x0, x20
	bl	_txq_set_fixed_prio_mode
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_4
LBB0_5:
Lloh11:
	adrp	x8, _PORT_CONFIG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PORT_CONFIG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #33554432
	bl	_wrlp
Lloh14:
	adrp	x8, _PORT_CONFIG_EXT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PORT_CONFIG_EXT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_wrlp
	ldr	w0, [x19, #16]
	bl	_mv643xx_eth_program_unicast_filter
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x23, #0
	mov	x20, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x21, x8, x23
	ldr	w8, [x21, #8]
	ldr	w9, [x21]
	add	w22, w8, w9, lsl #2
	mov	x0, x20
	bl	_RXQ_CURRENT_DESC_PTR
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_wrlp
	mov	x0, x21
	bl	_rxq_enable
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	add	x23, x23, #16
	cmp	x20, x8
	b.lt	LBB0_7
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_SERIAL_CONTROL,4,2        ; @PORT_SERIAL_CONTROL
	.comm	_SERIAL_PORT_ENABLE,4,2         ; @SERIAL_PORT_ENABLE
	.comm	_DO_NOT_FORCE_LINK_FAIL,4,2     ; @DO_NOT_FORCE_LINK_FAIL
	.comm	_FORCE_LINK_PASS,4,2            ; @FORCE_LINK_PASS
	.comm	_PORT_CONFIG,4,2                ; @PORT_CONFIG
	.comm	_PORT_CONFIG_EXT,4,2            ; @PORT_CONFIG_EXT
	.no_dead_strip	_port_start
.subsections_via_symbols
