	.file	"extr_spi-vsc7385.c_vsc7385_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vsc7385_setup, @function
vsc7385_setup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	edx, edx
	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
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 16
	.cfi_def_cfa_offset 56
	mov	r8d, DWORD PTR VSC7385_CLOCK_DELAY[rip]
	mov	rbx, QWORD PTR [rdi]
	mov	esi, DWORD PTR VSC73XX_BLOCK_SYSTEM[rip]
	mov	r9d, DWORD PTR VSC7385_CLOCK_DELAY_MASK[rip]
	push	r8
	.cfi_def_cfa_offset 64
	mov	ecx, DWORD PTR VSC73XX_ICPU_CLOCK_DELAY[rip]
	call	vsc7385_write_verify@PLT
	pop	rsi
	.cfi_def_cfa_offset 56
	pop	rdi
	.cfi_def_cfa_offset 48
	test	eax, eax
	je	.L6
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	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
.L6:
	.cfi_restore_state
	mov	r8d, DWORD PTR VSC7385_ADVPORTM_INIT[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rdi, rbp
	mov	ecx, DWORD PTR VSC73XX_ADVPORTM[rip]
	mov	edx, DWORD PTR VSC73XX_SUBBLOCK_PORT_MAC[rip]
	mov	r9d, DWORD PTR VSC7385_ADVPORTM_MASK[rip]
	push	r8
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR VSC73XX_BLOCK_MAC[rip]
	call	vsc7385_write_verify@PLT
	pop	rdx
	.cfi_def_cfa_offset 56
	pop	rcx
	.cfi_def_cfa_offset 48
	test	eax, eax
	jne	.L1
	mov	r8d, DWORD PTR VSC7385_MAC_CFG_RESET[rip]
	mov	ecx, DWORD PTR VSC73XX_MAC_CFG[rip]
	mov	rdi, rbp
	mov	edx, DWORD PTR VSC73XX_SUBBLOCK_PORT_MAC[rip]
	mov	esi, DWORD PTR VSC73XX_BLOCK_MAC[rip]
	call	vsc7385_write@PLT
	test	eax, eax
	jne	.L1
	mov	edi, DWORD PTR 12[rbx]
	mov	r13d, DWORD PTR VSC73XX_MAC_CFG_INIT[rip]
	call	VSC73XX_MAC_CFG_TX_IPG@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	r12d, eax
	call	VSC73XX_MAC_CFG_CLK_SEL@PLT
	mov	r8d, r12d
	or	r8d, eax
	or	r8d, r13d
	cmp	QWORD PTR [rbx], 0
	je	.L3
	or	r8d, DWORD PTR VSC73XX_MAC_CFG_BIT2[rip]
.L3:
	mov	ecx, DWORD PTR VSC73XX_MAC_CFG[rip]
	mov	edx, DWORD PTR VSC73XX_SUBBLOCK_PORT_MAC[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR VSC73XX_BLOCK_MAC[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	vsc7385_write@PLT
	.cfi_endproc
.LFE0:
	.size	vsc7385_setup, .-vsc7385_setup
	.comm	VSC73XX_SUBBLOCK_PORT_MAC,4,4
	.comm	VSC73XX_MAC_CFG_INIT,4,4
	.comm	VSC73XX_MAC_CFG_BIT2,4,4
	.comm	VSC73XX_MAC_CFG,4,4
	.comm	VSC73XX_ICPU_CLOCK_DELAY,4,4
	.comm	VSC73XX_BLOCK_SYSTEM,4,4
	.comm	VSC73XX_BLOCK_MAC,4,4
	.comm	VSC73XX_ADVPORTM,4,4
	.comm	VSC7385_MAC_CFG_RESET,4,4
	.comm	VSC7385_CLOCK_DELAY_MASK,4,4
	.comm	VSC7385_CLOCK_DELAY,4,4
	.comm	VSC7385_ADVPORTM_MASK,4,4
	.comm	VSC7385_ADVPORTM_INIT,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_spi-vsc7385.c_vsc7385_setup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vsc7385_setup, %function
vsc7385_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r2, .L10
	ldr	r3, .L10+4
	ldr	ip, [r2]
	ldr	r3, [r3]
	sub	sp, sp, #16
	stm	sp, {r3, ip}
	ldr	r1, .L10+8
	ldr	r2, .L10+12
	str	r3, [sp, #8]
	ldr	r3, [r1]
	ldr	r1, [r2]
	mov	r2, #0
	mov	r4, r0
	ldr	r5, [r0]
	bl	vsc7385_write_verify
	cmp	r0, #0
	beq	.L9
.L1:
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	ldr	r2, .L10+16
	ldr	r3, .L10+20
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L10+24
	ldr	r7, .L10+28
	ldr	r6, .L10+32
	str	r1, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp]
	ldr	r3, [r2]
	mov	r0, r4
	ldr	r2, [r7]
	ldr	r1, [r6]
	bl	vsc7385_write_verify
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L10+36
	ldr	r8, .L10+40
	ldr	r2, [r3]
	mov	r0, r4
	str	r2, [sp]
	ldr	r3, [r8]
	ldr	r2, [r7]
	ldr	r1, [r6]
	bl	vsc7385_write
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L10+44
	ldr	r0, [r5, #8]
	ldr	r10, [r3]
	bl	VSC73XX_MAC_CFG_TX_IPG
	mov	r9, r0
	ldr	r0, [r5, #4]
	bl	VSC73XX_MAC_CFG_CLK_SEL
	ldr	r3, [r5]
	orr	r0, r9, r0
	cmp	r3, #0
	ldrne	r3, .L10+48
	orr	r0, r0, r10
	ldrne	r3, [r3]
	ldr	r2, [r7]
	orrne	r0, r0, r3
	str	r0, [sp]
	ldr	r3, [r8]
	mov	r0, r4
	ldr	r1, [r6]
	bl	vsc7385_write
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	.align	2
.L10:
	.word	VSC7385_CLOCK_DELAY_MASK
	.word	VSC7385_CLOCK_DELAY
	.word	VSC73XX_ICPU_CLOCK_DELAY
	.word	VSC73XX_BLOCK_SYSTEM
	.word	VSC7385_ADVPORTM_MASK
	.word	VSC7385_ADVPORTM_INIT
	.word	VSC73XX_ADVPORTM
	.word	VSC73XX_SUBBLOCK_PORT_MAC
	.word	VSC73XX_BLOCK_MAC
	.word	VSC7385_MAC_CFG_RESET
	.word	VSC73XX_MAC_CFG
	.word	VSC73XX_MAC_CFG_INIT
	.word	VSC73XX_MAC_CFG_BIT2
	.size	vsc7385_setup, .-vsc7385_setup
	.comm	VSC73XX_SUBBLOCK_PORT_MAC,4,4
	.comm	VSC73XX_MAC_CFG_INIT,4,4
	.comm	VSC73XX_MAC_CFG_BIT2,4,4
	.comm	VSC73XX_MAC_CFG,4,4
	.comm	VSC73XX_ICPU_CLOCK_DELAY,4,4
	.comm	VSC73XX_BLOCK_SYSTEM,4,4
	.comm	VSC73XX_BLOCK_MAC,4,4
	.comm	VSC73XX_ADVPORTM,4,4
	.comm	VSC7385_MAC_CFG_RESET,4,4
	.comm	VSC7385_CLOCK_DELAY_MASK,4,4
	.comm	VSC7385_CLOCK_DELAY,4,4
	.comm	VSC7385_ADVPORTM_MASK,4,4
	.comm	VSC7385_ADVPORTM_INIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
