	.file	"extr_b53_common.c_b53_configure_ports.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to enable reverse MII mode\n"
	.text
	.p2align 4
	.type	b53_configure_ports, @function
b53_configure_ports:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	r13d, DWORD PTR 4[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	is5325@PLT
	test	rax, rax
	je	.L2
	mov	edx, DWORD PTR B53_PORT_OVERRIDE_CTRL[rip]
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	lea	r12, 4[rsp]
	mov	rdi, rbp
	mov	rcx, r12
	call	b53_read8@PLT
	mov	ecx, DWORD PTR 4[rsp]
	mov	eax, DWORD PTR PORT_OVERRIDE_RV_MII_25[rip]
	test	ecx, eax
	je	.L19
.L6:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	is531x5@PLT
	test	rax, rax
	je	.L5
	cmp	DWORD PTR B53_CPU_PORT[rip], r13d
	je	.L21
.L5:
	mov	rdi, rbp
	xor	r12d, r12d
	call	is5301x@PLT
	test	rax, rax
	je	.L1
	cmp	r13d, 8
	je	.L22
	mov	edi, r13d
	call	B53_GMII_PORT_OVERRIDE_CTRL@PLT
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	lea	rcx, 4[rsp]
	mov	rdi, rbp
	mov	edx, eax
	mov	r13d, eax
	call	b53_read8@PLT
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	mov	edx, r13d
	mov	rdi, rbp
	mov	ecx, DWORD PTR GMII_PO_LINK[rip]
	or	ecx, DWORD PTR GMII_PO_RX_FLOW[rip]
	or	ecx, DWORD PTR GMII_PO_TX_FLOW[rip]
	or	ecx, DWORD PTR GMII_PO_EN[rip]
	or	ecx, DWORD PTR GMII_PO_SPEED_2000M[rip]
	or	ecx, DWORD PTR 4[rsp]
	mov	DWORD PTR 4[rsp], ecx
	call	b53_write8@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edx, DWORD PTR B53_PORT_OVERRIDE_CTRL[rip]
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	or	ecx, eax
	mov	rdi, rbp
	call	b53_write8@PLT
	mov	edx, DWORD PTR B53_PORT_OVERRIDE_CTRL[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	call	b53_read8@PLT
	mov	eax, DWORD PTR 4[rsp]
	test	DWORD PTR PORT_OVERRIDE_RV_MII_25[rip], eax
	jne	.L6
	lea	rdi, .LC0[rip]
	call	pr_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edx, DWORD PTR B53_PORT_OVERRIDE_CTRL[rip]
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	lea	rcx, 4[rsp]
	mov	rdi, rbp
	call	b53_read8@PLT
	mov	edx, DWORD PTR B53_PORT_OVERRIDE_CTRL[rip]
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	mov	rdi, rbp
	mov	ecx, DWORD PTR PORT_OVERRIDE_LINK[rip]
	or	ecx, DWORD PTR PORT_OVERRIDE_RX_FLOW[rip]
	or	ecx, DWORD PTR PORT_OVERRIDE_TX_FLOW[rip]
	or	ecx, DWORD PTR PORT_OVERRIDE_SPEED_2000M[rip]
	or	ecx, DWORD PTR PORT_OVERRIDE_EN[rip]
	or	ecx, DWORD PTR 4[rsp]
	mov	DWORD PTR 4[rsp], ecx
	call	b53_write8@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edx, DWORD PTR B53_PORT_OVERRIDE_CTRL[rip]
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	mov	rcx, rsp
	mov	rdi, rbp
	call	b53_read8@PLT
	mov	edx, DWORD PTR B53_PORT_OVERRIDE_CTRL[rip]
	mov	ecx, DWORD PTR [rsp]
	mov	rdi, rbp
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	or	ecx, DWORD PTR PORT_OVERRIDE_EN[rip]
	or	ecx, DWORD PTR PORT_OVERRIDE_LINK[rip]
	call	b53_write8@PLT
	mov	r12d, DWORD PTR 0[rbp]
	mov	edi, 5
	call	BIT@PLT
	test	r12d, eax
	je	.L6
	mov	edi, 5
	call	B53_GMII_PORT_OVERRIDE_CTRL@PLT
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	lea	rcx, 4[rsp]
	mov	rdi, rbp
	mov	edx, eax
	mov	r12d, eax
	call	b53_read8@PLT
	mov	esi, DWORD PTR B53_CTRL_PAGE[rip]
	mov	edx, r12d
	mov	rdi, rbp
	mov	ecx, DWORD PTR GMII_PO_LINK[rip]
	or	ecx, DWORD PTR GMII_PO_RX_FLOW[rip]
	or	ecx, DWORD PTR GMII_PO_TX_FLOW[rip]
	or	ecx, DWORD PTR GMII_PO_EN[rip]
	or	ecx, DWORD PTR 4[rsp]
	mov	DWORD PTR 4[rsp], ecx
	call	b53_write8@PLT
	jmp	.L6
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	b53_configure_ports, .-b53_configure_ports
	.comm	PORT_OVERRIDE_TX_FLOW,4,4
	.comm	PORT_OVERRIDE_SPEED_2000M,4,4
	.comm	PORT_OVERRIDE_RX_FLOW,4,4
	.comm	PORT_OVERRIDE_RV_MII_25,4,4
	.comm	PORT_OVERRIDE_LINK,4,4
	.comm	PORT_OVERRIDE_EN,4,4
	.comm	GMII_PO_TX_FLOW,4,4
	.comm	GMII_PO_SPEED_2000M,4,4
	.comm	GMII_PO_RX_FLOW,4,4
	.comm	GMII_PO_LINK,4,4
	.comm	GMII_PO_EN,4,4
	.comm	EINVAL,4,4
	.comm	B53_PORT_OVERRIDE_CTRL,4,4
	.comm	B53_CTRL_PAGE,4,4
	.comm	B53_CPU_PORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_b53_common.c_b53_configure_ports.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to enable reverse MII mode\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	b53_configure_ports, %function
b53_configure_ports:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L27
	sub	sp, sp, #20
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r5, [r0, #4]
	bl	is5325
	cmp	r0, #0
	beq	.L2
	ldr	r6, .L27+4
	ldr	r5, .L27+8
	ldr	r7, .L27+12
	ldr	r2, [r6]
	add	r3, sp, #8
	mov	r0, r4
	ldr	r1, [r5]
	bl	b53_read8
	ldr	r3, [r7]
	ldr	r2, [sp, #8]
	tst	r2, r3
	beq	.L23
.L19:
	mov	r0, #0
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	mov	r0, r4
	bl	is531x5
	cmp	r0, #0
	beq	.L5
	ldr	r3, .L27+16
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L25
.L5:
	mov	r0, r4
	bl	is5301x
	cmp	r0, #0
	beq	.L1
	cmp	r5, #8
	beq	.L26
	mov	r0, r5
	bl	B53_GMII_PORT_OVERRIDE_CTRL
	ldr	r5, .L27+8
	mov	r2, r0
	ldr	r1, [r5]
	add	r3, sp, #8
	mov	r6, r0
	mov	r0, r4
	bl	b53_read8
	ldr	r2, .L27+20
	ldr	r3, .L27+24
	ldr	r1, .L27+28
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r0, [r1]
	ldr	r2, .L27+32
	ldr	r1, .L27+36
	orr	r3, r3, ip
.L21:
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r3, r3, r0
	orr	r3, r3, r2
	ldr	r2, [sp, #8]
	orr	r3, r3, r1
	orr	r3, r3, r2
	mov	r2, r6
.L20:
	ldr	r1, [r5]
	mov	r0, r4
	str	r3, [sp, #8]
	bl	b53_write8
	b	.L19
.L23:
	orr	r3, r2, r3
	ldr	r1, [r5]
	ldr	r2, [r6]
	mov	r0, r4
	bl	b53_write8
	ldr	r2, [r6]
	add	r3, sp, #8
	mov	r0, r4
	ldr	r1, [r5]
	bl	b53_read8
	ldr	r3, [r7]
	ldr	r2, [sp, #8]
	tst	r2, r3
	bne	.L19
	ldr	r0, .L27+40
	bl	pr_err
	ldr	r3, .L27+44
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L26:
	ldr	r6, .L27+4
	ldr	r5, .L27+8
	ldr	r2, [r6]
	ldr	r1, [r5]
	add	r3, sp, #8
	mov	r0, r4
	bl	b53_read8
	ldr	r2, .L27+48
	ldr	r3, .L27+52
	ldr	r1, .L27+56
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r0, [r1]
	ldr	r1, .L27+64
	ldr	r2, [r2]
	orr	r3, r3, ip
	ldr	r1, [r1]
	orr	r3, r3, r0
	orr	r3, r3, r2
	ldr	r2, [sp, #8]
	orr	r3, r3, r1
	orr	r3, r3, r2
	ldr	r2, [r6]
	b	.L20
.L25:
	ldr	r6, .L27+4
	ldr	r5, .L27+8
	ldr	r2, [r6]
	ldr	r1, [r5]
	add	r3, sp, #4
	mov	r0, r4
	bl	b53_read8
	ldr	r3, .L27+64
	ldr	r1, .L27+52
	ldr	r2, [sp, #4]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r2, r3
	orr	r3, r3, r1
	ldr	r2, [r6]
	ldr	r1, [r5]
	mov	r0, r4
	bl	b53_write8
	mov	r0, #5
	ldr	r6, [r4]
	bl	BIT
	tst	r6, r0
	beq	.L19
	mov	r0, #5
	bl	B53_GMII_PORT_OVERRIDE_CTRL
	ldr	r1, [r5]
	mov	r2, r0
	add	r3, sp, #8
	mov	r6, r0
	mov	r0, r4
	bl	b53_read8
	ldr	r1, .L27+20
	ldr	r3, .L27+24
	ldr	r0, [r1]
	ldr	r2, .L27+28
	ldr	r3, [r3]
	ldr	r1, .L27+32
	b	.L21
.L24:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC1
	.word	B53_PORT_OVERRIDE_CTRL
	.word	B53_CTRL_PAGE
	.word	PORT_OVERRIDE_RV_MII_25
	.word	B53_CPU_PORT
	.word	GMII_PO_RX_FLOW
	.word	GMII_PO_LINK
	.word	GMII_PO_TX_FLOW
	.word	GMII_PO_EN
	.word	GMII_PO_SPEED_2000M
	.word	.LC0
	.word	EINVAL
	.word	PORT_OVERRIDE_RX_FLOW
	.word	PORT_OVERRIDE_LINK
	.word	PORT_OVERRIDE_TX_FLOW
	.word	PORT_OVERRIDE_SPEED_2000M
	.word	PORT_OVERRIDE_EN
	.size	b53_configure_ports, .-b53_configure_ports
	.comm	PORT_OVERRIDE_TX_FLOW,4,4
	.comm	PORT_OVERRIDE_SPEED_2000M,4,4
	.comm	PORT_OVERRIDE_RX_FLOW,4,4
	.comm	PORT_OVERRIDE_RV_MII_25,4,4
	.comm	PORT_OVERRIDE_LINK,4,4
	.comm	PORT_OVERRIDE_EN,4,4
	.comm	GMII_PO_TX_FLOW,4,4
	.comm	GMII_PO_SPEED_2000M,4,4
	.comm	GMII_PO_RX_FLOW,4,4
	.comm	GMII_PO_LINK,4,4
	.comm	GMII_PO_EN,4,4
	.comm	EINVAL,4,4
	.comm	B53_PORT_OVERRIDE_CTRL,4,4
	.comm	B53_CTRL_PAGE,4,4
	.comm	B53_CPU_PORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
