	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv88e6131_setup_port
_mv88e6131_setup_port:                  ## @mv88e6131_setup_port
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	%esi, %edi
	callq	_REG_PORT
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_dsa_is_cpu_port
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$1, %r14d
	movl	%r15d, %ecx
	shll	%cl, %r14d
	movl	$62, %edx
	jmp	LBB0_3
LBB0_2:
	movl	(%rbx), %eax
	movl	$1, %r14d
	movl	%r15d, %ecx
	shll	%cl, %r14d
	btl	%r15d, %eax
	movl	$3, %eax
	movl	$62, %edx
	cmovael	%eax, %edx
LBB0_3:
	movl	$1, %r13d
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_REG_WRITE
	movq	%rbx, %rdi
	callq	_dsa_upstream_port
	cmpl	%r15d, %eax
	movl	$1335, %eax                     ## imm = 0x537
	movl	$1075, %ecx                     ## imm = 0x433
	cmovel	%eax, %ecx
	movl	(%rbx), %eax
	andl	%r14d, %eax
	movl	%ecx, %edx
	orl	$256, %edx                      ## imm = 0x100
	testl	%eax, %eax
	cmovel	%ecx, %edx
	movl	%r12d, %edi
	movl	$4, %esi
	callq	_REG_WRITE
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_dsa_is_cpu_port
	xorl	%edx, %edx
	testq	%rax, %rax
	setne	%dl
	shll	$15, %edx
	movl	%r12d, %edi
	movl	$5, %esi
	callq	_REG_WRITE
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_dsa_is_cpu_port
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	4(%rbx), %r13d
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_dsa_upstream_port
	movl	%eax, %ecx
	shll	%cl, %r13d
LBB0_6:
	movl	%r15d, %eax
	shll	$12, %eax
	movzwl	%ax, %edx
	orl	%r13d, %edx
	movl	%r12d, %edi
	movl	$6, %esi
	callq	_REG_WRITE
	movl	%r12d, %edi
	movl	$7, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE
	movq	%rbx, %rdi
	callq	_dsa_upstream_port
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_dsa_upstream_port
	xorl	%edx, %edx
	cmpl	%r15d, %eax
	sete	%dl
	shll	$6, %edx
	orl	%r13d, %edx
	orl	$128, %edx
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_REG_WRITE
	movl	%r12d, %edi
	movl	$9, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE
	movl	%r12d, %edi
	movl	$10, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE
	movl	%r12d, %edi
	movl	$11, %esi
	movl	%r14d, %edx
	callq	_REG_WRITE
	movl	%r12d, %edi
	movl	$24, %esi
	movl	$12816, %edx                    ## imm = 0x3210
	callq	_REG_WRITE
	movl	%r12d, %edi
	movl	$25, %esi
	movl	$30292, %edx                    ## imm = 0x7654
	callq	_REG_WRITE
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mv88e6131_setup_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv88e6131_setup_port
_mv88e6131_setup_port:                  ; @mv88e6131_setup_port
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x22, x0
	mov	x0, x1
	bl	_REG_PORT
	mov	x19, x0
	mov	x0, x22
	mov	x1, x21
	bl	_dsa_is_cpu_port
	cbz	x0, LBB0_2
; %bb.1:
	mov	w8, #1
	lsl	w20, w8, w21
	mov	w2, #62
	b	LBB0_3
LBB0_2:
	ldr	w8, [x22]
	mov	w9, #1
	lsl	w20, w9, w21
	tst	w8, w20
	mov	w8, #62
	mov	w9, #3
	csel	w2, w9, w8, eq
LBB0_3:
	mov	w23, #1
	mov	x0, x19
	mov	w1, #1
	bl	_REG_WRITE
	mov	x0, x22
	bl	_dsa_upstream_port
	mov	w8, #1075
	mov	w9, #1335
	cmp	w0, w21
	csel	w8, w9, w8, eq
	ldr	w9, [x22]
	orr	w10, w8, #0x100
	tst	w9, w20
	csel	w2, w8, w10, eq
	mov	x0, x19
	mov	w1, #4
	bl	_REG_WRITE
	mov	x0, x22
	mov	x1, x21
	bl	_dsa_is_cpu_port
	cmp	x0, #0
	cset	w8, ne
	lsl	w2, w8, #15
	mov	x0, x19
	mov	w1, #5
	bl	_REG_WRITE
	mov	x0, x22
	mov	x1, x21
	bl	_dsa_is_cpu_port
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w8, [x22, #4]
	b	LBB0_6
LBB0_5:
	mov	x0, x22
	bl	_dsa_upstream_port
	lsl	w8, w23, w0
LBB0_6:
	ubfiz	w9, w21, #12, #4
	orr	w2, w8, w9
	mov	x0, x19
	mov	w1, #6
	bl	_REG_WRITE
	mov	x0, x19
	mov	w1, #7
	mov	w2, #0
	bl	_REG_WRITE
	mov	x0, x22
	bl	_dsa_upstream_port
	mov	x23, x0
	mov	x0, x22
	bl	_dsa_upstream_port
	mov	w8, #128
	mov	w9, #192
	cmp	w0, w21
	csel	w8, w9, w8, eq
	orr	w2, w8, w23
	mov	x0, x19
	mov	w1, #8
	bl	_REG_WRITE
	mov	x0, x19
	mov	w1, #9
	mov	w2, #0
	bl	_REG_WRITE
	mov	x0, x19
	mov	w1, #10
	mov	w2, #0
	bl	_REG_WRITE
	mov	x0, x19
	mov	w1, #11
	mov	x2, x20
	bl	_REG_WRITE
	mov	x0, x19
	mov	w1, #24
	mov	w2, #12816
	bl	_REG_WRITE
	mov	x0, x19
	mov	w1, #25
	mov	w2, #30292
	bl	_REG_WRITE
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mv88e6131_setup_port
.subsections_via_symbols
