	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b53_configure_ports
_b53_configure_ports:                   ## @b53_configure_ports
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %r15d
	callq	_is5325
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_B53_PORT_OVERRIDE_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_b53_read8
	movl	-36(%rbp), %eax
	movq	_PORT_OVERRIDE_RV_MII_25@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	testl	%eax, %ecx
	jne	LBB0_3
## %bb.2:
	movl	(%r14), %esi
	movl	(%r15), %edx
	orl	%eax, %ecx
	movq	%rbx, %rdi
	callq	_b53_write8
	movl	(%r14), %esi
	movl	(%r15), %edx
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_b53_read8
	movl	(%r12), %eax
	testl	%eax, -36(%rbp)
	jne	LBB0_3
## %bb.12:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_4:
	movq	%rbx, %rdi
	callq	_is531x5
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	_B53_CPU_PORT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_9
## %bb.6:
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_B53_PORT_OVERRIDE_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_b53_read8
	movl	(%r15), %esi
	movq	_PORT_OVERRIDE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	-36(%rbp), %ecx
	movl	(%r14), %edx
	movq	_PORT_OVERRIDE_LINK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_b53_write8
	movl	(%rbx), %r14d
	movl	$5, %edi
	callq	_BIT
	testl	%r14d, %eax
	je	LBB0_3
## %bb.7:
	movl	$5, %edi
	callq	_B53_GMII_PORT_OVERRIDE_CTRL
	movl	%eax, %r14d
	movl	(%r15), %esi
	leaq	-40(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_b53_read8
	movq	_GMII_PO_LINK@GOTPCREL(%rip), %rax
	movq	_GMII_PO_RX_FLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_GMII_PO_TX_FLOW@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_GMII_PO_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	-40(%rbp), %ecx
	movl	%ecx, -40(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_b53_write8
LBB0_3:
	xorl	%r14d, %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, %rdi
	callq	_is5301x
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	cmpl	$8, %r15d
	jne	LBB0_13
## %bb.11:
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_B53_PORT_OVERRIDE_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_b53_read8
	movq	_PORT_OVERRIDE_LINK@GOTPCREL(%rip), %rax
	movq	_PORT_OVERRIDE_RX_FLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_PORT_OVERRIDE_TX_FLOW@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_PORT_OVERRIDE_SPEED_2000M@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_PORT_OVERRIDE_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	-36(%rbp), %ecx
	movl	%ecx, -36(%rbp)
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	jmp	LBB0_14
LBB0_13:
	movl	%r15d, %edi
	callq	_B53_GMII_PORT_OVERRIDE_CTRL
	movl	%eax, %r15d
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_b53_read8
	movq	_GMII_PO_LINK@GOTPCREL(%rip), %rax
	movq	_GMII_PO_RX_FLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_GMII_PO_TX_FLOW@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_GMII_PO_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_GMII_PO_SPEED_2000M@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	-36(%rbp), %ecx
	movl	%ecx, -36(%rbp)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
LBB0_14:
	callq	_b53_write8
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_B53_CTRL_PAGE,4,2              ## @B53_CTRL_PAGE
	.comm	_B53_PORT_OVERRIDE_CTRL,4,2     ## @B53_PORT_OVERRIDE_CTRL
	.comm	_PORT_OVERRIDE_RV_MII_25,4,2    ## @PORT_OVERRIDE_RV_MII_25
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable reverse MII mode\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_B53_CPU_PORT,4,2               ## @B53_CPU_PORT
	.comm	_PORT_OVERRIDE_EN,4,2           ## @PORT_OVERRIDE_EN
	.comm	_PORT_OVERRIDE_LINK,4,2         ## @PORT_OVERRIDE_LINK
	.comm	_GMII_PO_LINK,4,2               ## @GMII_PO_LINK
	.comm	_GMII_PO_RX_FLOW,4,2            ## @GMII_PO_RX_FLOW
	.comm	_GMII_PO_TX_FLOW,4,2            ## @GMII_PO_TX_FLOW
	.comm	_GMII_PO_EN,4,2                 ## @GMII_PO_EN
	.comm	_PORT_OVERRIDE_RX_FLOW,4,2      ## @PORT_OVERRIDE_RX_FLOW
	.comm	_PORT_OVERRIDE_TX_FLOW,4,2      ## @PORT_OVERRIDE_TX_FLOW
	.comm	_PORT_OVERRIDE_SPEED_2000M,4,2  ## @PORT_OVERRIDE_SPEED_2000M
	.comm	_GMII_PO_SPEED_2000M,4,2        ## @GMII_PO_SPEED_2000M
	.no_dead_strip	_b53_configure_ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b53_configure_ports
_b53_configure_ports:                   ; @b53_configure_ports
	.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
	mov	x19, x0
	ldr	w20, [x0, #4]
	bl	_is5325
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x20, _B53_CTRL_PAGE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _B53_CTRL_PAGE@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _B53_PORT_OVERRIDE_CTRL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _B53_PORT_OVERRIDE_CTRL@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, sp, #12
	mov	x0, x19
	bl	_b53_read8
	ldr	w8, [sp, #12]
Lloh4:
	adrp	x22, _PORT_OVERRIDE_RV_MII_25@GOTPAGE
Lloh5:
	ldr	x22, [x22, _PORT_OVERRIDE_RV_MII_25@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.2:
	ldr	w1, [x20]
	ldr	w2, [x21]
	orr	w3, w9, w8
	mov	x0, x19
	bl	_b53_write8
	ldr	w1, [x20]
	ldr	w2, [x21]
	add	x3, sp, #12
	mov	x0, x19
	bl	_b53_read8
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_4:
	mov	x0, x19
	bl	_is531x5
	cbz	x0, LBB0_8
; %bb.5:
Lloh11:
	adrp	x8, _B53_CPU_PORT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _B53_CPU_PORT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_8
; %bb.6:
Lloh14:
	adrp	x21, _B53_CTRL_PAGE@GOTPAGE
Lloh15:
	ldr	x21, [x21, _B53_CTRL_PAGE@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh16:
	adrp	x20, _B53_PORT_OVERRIDE_CTRL@GOTPAGE
Lloh17:
	ldr	x20, [x20, _B53_PORT_OVERRIDE_CTRL@GOTPAGEOFF]
	ldr	w2, [x20]
	add	x3, sp, #12
	mov	x0, x19
	bl	_b53_read8
	ldr	w1, [x21]
	ldr	w2, [x20]
	ldr	w8, [sp, #12]
Lloh18:
	adrp	x9, _PORT_OVERRIDE_EN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PORT_OVERRIDE_EN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _PORT_OVERRIDE_LINK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PORT_OVERRIDE_LINK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x0, x19
	bl	_b53_write8
	ldr	w20, [x19]
	mov	w0, #5
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_14
; %bb.7:
	mov	w0, #5
	bl	_B53_GMII_PORT_OVERRIDE_CTRL
	mov	x20, x0
	ldr	w1, [x21]
	add	x3, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_b53_read8
Lloh24:
	adrp	x8, _GMII_PO_LINK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _GMII_PO_LINK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _GMII_PO_RX_FLOW@GOTPAGE
Lloh28:
	ldr	x9, [x9, _GMII_PO_RX_FLOW@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh30:
	adrp	x9, _GMII_PO_TX_FLOW@GOTPAGE
Lloh31:
	ldr	x9, [x9, _GMII_PO_TX_FLOW@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh33:
	adrp	x9, _GMII_PO_EN@GOTPAGE
Lloh34:
	ldr	x9, [x9, _GMII_PO_EN@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #8]
	orr	w3, w8, w9
	str	w3, [sp, #8]
	b	LBB0_12
LBB0_8:
	mov	x0, x19
	bl	_is5301x
	cbz	x0, LBB0_15
; %bb.9:
	cmp	w20, #8
	b.ne	LBB0_11
; %bb.10:
Lloh36:
	adrp	x20, _B53_CTRL_PAGE@GOTPAGE
Lloh37:
	ldr	x20, [x20, _B53_CTRL_PAGE@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh38:
	adrp	x21, _B53_PORT_OVERRIDE_CTRL@GOTPAGE
Lloh39:
	ldr	x21, [x21, _B53_PORT_OVERRIDE_CTRL@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, sp, #12
	mov	x0, x19
	bl	_b53_read8
Lloh40:
	adrp	x8, _PORT_OVERRIDE_LINK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _PORT_OVERRIDE_LINK@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
Lloh43:
	adrp	x9, _PORT_OVERRIDE_RX_FLOW@GOTPAGE
Lloh44:
	ldr	x9, [x9, _PORT_OVERRIDE_RX_FLOW@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh46:
	adrp	x9, _PORT_OVERRIDE_TX_FLOW@GOTPAGE
Lloh47:
	ldr	x9, [x9, _PORT_OVERRIDE_TX_FLOW@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
Lloh49:
	adrp	x10, _PORT_OVERRIDE_SPEED_2000M@GOTPAGE
Lloh50:
	ldr	x10, [x10, _PORT_OVERRIDE_SPEED_2000M@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh51:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh52:
	adrp	x9, _PORT_OVERRIDE_EN@GOTPAGE
Lloh53:
	ldr	x9, [x9, _PORT_OVERRIDE_EN@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #12]
	orr	w3, w8, w9
	str	w3, [sp, #12]
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	b	LBB0_13
LBB0_11:
	mov	x0, x20
	bl	_B53_GMII_PORT_OVERRIDE_CTRL
	mov	x20, x0
Lloh55:
	adrp	x21, _B53_CTRL_PAGE@GOTPAGE
Lloh56:
	ldr	x21, [x21, _B53_CTRL_PAGE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x3, sp, #12
	mov	x0, x19
	mov	x2, x20
	bl	_b53_read8
Lloh57:
	adrp	x8, _GMII_PO_LINK@GOTPAGE
Lloh58:
	ldr	x8, [x8, _GMII_PO_LINK@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
Lloh60:
	adrp	x9, _GMII_PO_RX_FLOW@GOTPAGE
Lloh61:
	ldr	x9, [x9, _GMII_PO_RX_FLOW@GOTPAGEOFF]
Lloh62:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh63:
	adrp	x9, _GMII_PO_TX_FLOW@GOTPAGE
Lloh64:
	ldr	x9, [x9, _GMII_PO_TX_FLOW@GOTPAGEOFF]
Lloh65:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh66:
	adrp	x9, _GMII_PO_EN@GOTPAGE
Lloh67:
	ldr	x9, [x9, _GMII_PO_EN@GOTPAGEOFF]
Lloh68:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh69:
	adrp	x9, _GMII_PO_SPEED_2000M@GOTPAGE
Lloh70:
	ldr	x9, [x9, _GMII_PO_SPEED_2000M@GOTPAGEOFF]
Lloh71:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #12]
	orr	w3, w8, w9
	str	w3, [sp, #12]
LBB0_12:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
LBB0_13:
	bl	_b53_write8
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_B53_CTRL_PAGE,4,2              ; @B53_CTRL_PAGE
	.comm	_B53_PORT_OVERRIDE_CTRL,4,2     ; @B53_PORT_OVERRIDE_CTRL
	.comm	_PORT_OVERRIDE_RV_MII_25,4,2    ; @PORT_OVERRIDE_RV_MII_25
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable reverse MII mode\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_B53_CPU_PORT,4,2               ; @B53_CPU_PORT
	.comm	_PORT_OVERRIDE_EN,4,2           ; @PORT_OVERRIDE_EN
	.comm	_PORT_OVERRIDE_LINK,4,2         ; @PORT_OVERRIDE_LINK
	.comm	_GMII_PO_LINK,4,2               ; @GMII_PO_LINK
	.comm	_GMII_PO_RX_FLOW,4,2            ; @GMII_PO_RX_FLOW
	.comm	_GMII_PO_TX_FLOW,4,2            ; @GMII_PO_TX_FLOW
	.comm	_GMII_PO_EN,4,2                 ; @GMII_PO_EN
	.comm	_PORT_OVERRIDE_RX_FLOW,4,2      ; @PORT_OVERRIDE_RX_FLOW
	.comm	_PORT_OVERRIDE_TX_FLOW,4,2      ; @PORT_OVERRIDE_TX_FLOW
	.comm	_PORT_OVERRIDE_SPEED_2000M,4,2  ; @PORT_OVERRIDE_SPEED_2000M
	.comm	_GMII_PO_SPEED_2000M,4,2        ; @GMII_PO_SPEED_2000M
	.no_dead_strip	_b53_configure_ports
.subsections_via_symbols
