	.file	"extr_rtl8366_mii.c_smi_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	smi_read, @function
smi_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edi
	call	smi_start@PLT
	mov	esi, 4
	mov	edi, 10
	call	smi_writeBits@PLT
	mov	esi, 3
	mov	edi, 4
	call	smi_writeBits@PLT
	mov	esi, 1
	mov	edi, 1
	call	smi_writeBits@PLT
	xor	eax, eax
	call	smi_waitAck@PLT
	test	rax, rax
	jne	.L4
	movzx	edi, bl
	mov	esi, 8
	call	smi_writeBits@PLT
	xor	eax, eax
	call	smi_waitAck@PLT
	test	rax, rax
	jne	.L4
	movzx	edi, bh
	mov	esi, 8
	call	smi_writeBits@PLT
	xor	eax, eax
	call	smi_waitAck@PLT
	test	rax, rax
	jne	.L4
	mov	edi, 8
	call	smi_readBits@PLT
	mov	esi, 1
	xor	edi, edi
	mov	r12d, eax
	call	smi_writeBits@PLT
	mov	edi, 8
	call	smi_readBits@PLT
	mov	esi, 1
	mov	edi, 1
	mov	ebx, eax
	call	smi_writeBits@PLT
	xor	eax, eax
	call	smi_stop@PLT
	xor	r8d, r8d
	test	rbp, rbp
	je	.L1
	mov	eax, ebx
	movzx	r12d, r12b
	sal	eax, 8
	movzx	eax, ax
	or	eax, r12d
	mov	DWORD PTR 0[rbp], eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r8d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r8d, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	smi_read, .-smi_read
	.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_rtl8366_mii.c_smi_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	smi_read, %function
smi_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r4, r0
	bl	smi_start
	mov	r1, #4
	mov	r0, #10
	bl	smi_writeBits
	mov	r1, #3
	mov	r0, #4
	bl	smi_writeBits
	mov	r1, #1
	mov	r0, r1
	bl	smi_writeBits
	bl	smi_waitAck
	cmp	r0, #0
	bne	.L4
	mov	r1, #8
	and	r0, r4, #255
	bl	smi_writeBits
	bl	smi_waitAck
	cmp	r0, #0
	bne	.L4
	asr	r0, r4, #8
	mov	r1, #8
	and	r0, r0, #255
	bl	smi_writeBits
	bl	smi_waitAck
	subs	r4, r0, #0
	bne	.L4
	mov	r0, #8
	bl	smi_readBits
	mov	r1, #1
	mov	r5, r0
	mov	r0, r4
	bl	smi_writeBits
	mov	r0, #8
	bl	smi_readBits
	mov	r1, #1
	mov	r7, r0
	mov	r0, r1
	bl	smi_writeBits
	bl	smi_stop
	cmp	r6, #0
	ldrne	r2, .L10
	andne	r3, r5, #255
	andne	r5, r2, r7, lsl #8
	orrne	r3, r5, r3
	strne	r3, [r6]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mvn	r4, #0
	b	.L1
.L11:
	.align	2
.L10:
	.word	65535
	.size	smi_read, .-smi_read
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
