	.file	"extr_rtl8366rb.c_rtl_getvgroup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rtl_getvgroup, @function
rtl_getvgroup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, edi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	r12, 12[rsp]
	call	device_get_softc@PLT
	mov	r14, rax
	mov	eax, DWORD PTR RTL8366_VMCR_MULT[rip]
	test	eax, eax
	jle	.L2
	xor	ebx, ebx
.L3:
	mov	rsi, QWORD PTR 0[rbp]
	mov	edi, ebx
	call	RTL8366_VMCR@PLT
	mov	edi, r13d
	mov	esi, eax
	call	rtl_readreg@PLT
	mov	DWORD PTR [r12+rbx*4], eax
	add	rbx, 1
	cmp	DWORD PTR RTL8366_VMCR_MULT[rip], ebx
	jg	.L3
.L2:
	mov	rdx, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR 8[r14]
	mov	rdi, r12
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR 20[rbp], eax
	call	RTL8366_VMCR_MEMBER@PLT
	mov	rdi, r12
	mov	ebx, eax
	call	RTL8366_VMCR_UNTAG@PLT
	cmp	QWORD PTR [r14], 0
	je	.L4
	mov	edx, ebx
	and	ebx, 15
	sar	edx
	and	edx, 16
	or	ebx, edx
	mov	edx, eax
	and	eax, 15
	sar	edx
	mov	DWORD PTR 8[rbp], ebx
	and	edx, 16
	or	eax, edx
	mov	DWORD PTR 12[rbp], eax
.L5:
	mov	rdi, r12
	call	RTL8366_VMCR_FID@PLT
	mov	DWORD PTR 16[rbp], eax
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	DWORD PTR 8[rbp], ebx
	mov	DWORD PTR 12[rbp], eax
	jmp	.L5
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rtl_getvgroup, .-rtl_getvgroup
	.comm	RTL8366_VMCR_MULT,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_rtl8366rb.c_rtl_getvgroup.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtl_getvgroup, %function
rtl_getvgroup:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L13
	sub	sp, sp, #16
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r1
	mov	r7, r0
	mov	r9, sp
	bl	device_get_softc
	ldr	r10, .L13+4
	mov	r8, r0
	ldr	r3, [r10]
	cmp	r3, #0
	movgt	r6, r9
	movgt	r4, #0
	ble	.L2
.L3:
	mov	r0, r4
	ldr	r1, [r5]
	bl	RTL8366_VMCR
	mov	r1, r0
	mov	r0, r7
	bl	rtl_readreg
	ldr	r3, [r10]
	add	r4, r4, #1
	cmp	r3, r4
	str	r0, [r6], #4
	bgt	.L3
.L2:
	ldr	r2, [r5]
	ldr	r3, [r8, #4]
	mov	r0, r9
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [r5, #16]
	bl	RTL8366_VMCR_MEMBER
	mov	r4, r0
	mov	r0, r9
	bl	RTL8366_VMCR_UNTAG
	ldr	r3, [r8]
	cmp	r3, #0
	asrne	r3, r0, #1
	asrne	r2, r4, #1
	andne	r0, r0, #15
	andne	r4, r4, #15
	andne	r3, r3, #16
	andne	r2, r2, #16
	orrne	r0, r3, r0
	orrne	r4, r2, r4
	str	r0, [r5, #8]
	str	r4, [r5, #4]
	mov	r0, r9
	bl	RTL8366_VMCR_FID
	ldr	r3, .L13
	str	r0, [r5, #12]
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, #0
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	RTL8366_VMCR_MULT
	.size	rtl_getvgroup, .-rtl_getvgroup
	.comm	RTL8366_VMCR_MULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
