	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp22_gop_init
_mvpp22_gop_init:                       ## @mvpp22_gop_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	%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	16(%rdi), %r13
	xorl	%r14d, %r14d
	cmpl	$0, (%r13)
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r12
	movl	(%rdi), %eax
	addl	$-128, %eax
	cmpl	$7, %eax
	ja	LBB0_11
## %bb.2:
	movl	$30, %ecx
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.5:
	cmpl	$0, 8(%r12)
	je	LBB0_10
## %bb.6:
	movq	%r12, %rdi
	callq	_mvpp22_gop_init_rgmii
	jmp	LBB0_9
LBB0_3:
	movl	$161, %ecx
	btl	%eax, %ecx
	jae	LBB0_7
## %bb.4:
	movq	%r12, %rdi
	callq	_mvpp22_gop_init_sgmii
LBB0_9:
	movl	(%r13), %edi
	movq	_GENCONF_PORT_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movl	8(%r12), %edi
	callq	_GENCONF_PORT_CTRL1_RESET
	movl	%eax, %ebx
	movl	8(%r12), %edi
	callq	_GENCONF_PORT_CTRL1_EN
	orl	%eax, %ebx
	orl	-44(%rbp), %ebx
	movl	%ebx, -44(%rbp)
	movl	(%r13), %edi
	movl	(%r15), %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	(%r13), %edi
	movq	_GENCONF_PORT_CTRL0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %r15
	movq	%r15, %rdx
	callq	_regmap_read
	movq	_GENCONF_PORT_CTRL0_CLK_DIV_PHASE_CLR@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -44(%rbp)
	movl	(%r13), %edi
	movl	(%rbx), %esi
	callq	_regmap_write
	movl	(%r13), %edi
	movq	_GENCONF_SOFT_RESET1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdx
	callq	_regmap_read
	movq	_GENCONF_SOFT_RESET1_GOP@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -44(%rbp)
	movl	(%r13), %edi
	movl	(%rbx), %esi
	callq	_regmap_write
	jmp	LBB0_11
LBB0_7:
	cmpl	$0, 8(%r12)
	je	LBB0_8
LBB0_10:
	movl	4(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r12, %rdi
	callq	_mvpp22_gop_init_10gkr
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_GENCONF_PORT_CTRL1,4,2         ## @GENCONF_PORT_CTRL1
	.comm	_GENCONF_PORT_CTRL0,4,2         ## @GENCONF_PORT_CTRL0
	.comm	_GENCONF_PORT_CTRL0_CLK_DIV_PHASE_CLR,4,2 ## @GENCONF_PORT_CTRL0_CLK_DIV_PHASE_CLR
	.comm	_GENCONF_SOFT_RESET1,4,2        ## @GENCONF_SOFT_RESET1
	.comm	_GENCONF_SOFT_RESET1_GOP,4,2    ## @GENCONF_SOFT_RESET1_GOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid port configuration\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mvpp22_gop_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp22_gop_init
_mvpp22_gop_init:                       ; @mvpp22_gop_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x21, [x0, #16]
	ldr	w8, [x21]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	sub	w8, w8, #128
	cmp	w8, #7
	b.hi	LBB0_8
; %bb.2:
	mov	w9, #1
	lsl	w8, w9, w8
	tst	w8, #0x1e
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_11
; %bb.4:
	mov	x0, x19
	bl	_mvpp22_gop_init_rgmii
	b	LBB0_7
LBB0_5:
	mov	w9, #161
	tst	w8, w9
	b.eq	LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_mvpp22_gop_init_sgmii
LBB0_7:
	ldr	w0, [x21]
Lloh0:
	adrp	x22, _GENCONF_PORT_CTRL1@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GENCONF_PORT_CTRL1@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w0, [x19, #8]
	bl	_GENCONF_PORT_CTRL1_RESET
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_GENCONF_PORT_CTRL1_EN
	orr	w8, w0, w20
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_regmap_write
	ldr	w0, [x21]
Lloh2:
	adrp	x19, _GENCONF_PORT_CTRL0@GOTPAGE
Lloh3:
	ldr	x19, [x19, _GENCONF_PORT_CTRL0@GOTPAGEOFF]
	ldr	w1, [x19]
	add	x2, sp, #12
	bl	_regmap_read
Lloh4:
	adrp	x8, _GENCONF_PORT_CTRL0_CLK_DIV_PHASE_CLR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GENCONF_PORT_CTRL0_CLK_DIV_PHASE_CLR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w0, [x21]
	ldr	w1, [x19]
	bl	_regmap_write
	ldr	w0, [x21]
Lloh7:
	adrp	x19, _GENCONF_SOFT_RESET1@GOTPAGE
Lloh8:
	ldr	x19, [x19, _GENCONF_SOFT_RESET1@GOTPAGEOFF]
	ldr	w1, [x19]
	add	x2, sp, #12
	bl	_regmap_read
Lloh9:
	adrp	x8, _GENCONF_SOFT_RESET1_GOP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GENCONF_SOFT_RESET1_GOP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w0, [x21]
	ldr	w1, [x19]
	bl	_regmap_write
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_12
LBB0_11:
	ldr	w0, [x19, #4]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_12:
	mov	x0, x19
	bl	_mvpp22_gop_init_10gkr
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GENCONF_PORT_CTRL1,4,2         ; @GENCONF_PORT_CTRL1
	.comm	_GENCONF_PORT_CTRL0,4,2         ; @GENCONF_PORT_CTRL0
	.comm	_GENCONF_PORT_CTRL0_CLK_DIV_PHASE_CLR,4,2 ; @GENCONF_PORT_CTRL0_CLK_DIV_PHASE_CLR
	.comm	_GENCONF_SOFT_RESET1,4,2        ; @GENCONF_SOFT_RESET1
	.comm	_GENCONF_SOFT_RESET1_GOP,4,2    ; @GENCONF_SOFT_RESET1_GOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid port configuration\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mvpp22_gop_init
.subsections_via_symbols
