	.file	"extr_ar8216.c_ar8xxx_check_link_states.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"down"
.LC1:
	.string	"up"
.LC2:
	.string	"Port %d is %s\n"
	.text
	.p2align 4
	.type	ar8xxx_check_link_states, @function
ar8xxx_check_link_states:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15, 8[rdi]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	mov	rdi, r15
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	mutex_lock@PLT
	mov	eax, DWORD PTR 32[r14]
	test	eax, eax
	jle	.L6
	xor	ebx, ebx
	xor	r13d, r13d
	lea	rbp, .LC1[rip]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 24[r14]
	mov	esi, ebx
	mov	rdi, r14
	mov	r12d, ebx
	call	[QWORD PTR [rax]]
	mov	rdx, QWORD PTR [r14]
	xor	ecx, ecx
	and	eax, DWORD PTR AR8216_PORT_STATUS_LINK_UP[rip]
	setne	cl
	lea	rdx, [rdx+rbx*4]
	cmp	DWORD PTR [rdx], ecx
	je	.L3
	mov	DWORD PTR [rdx], ecx
	mov	rcx, rbp
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR 24[r14]
	mov	esi, ebx
	mov	rdi, r14
	call	[QWORD PTR 8[rax]]
	lea	rcx, .LC0[rip]
.L4:
	mov	rdi, QWORD PTR 16[r14]
	mov	edx, r12d
	lea	rsi, .LC2[rip]
	mov	r13d, 1
	call	dev_info@PLT
.L3:
	add	rbx, 1
	cmp	DWORD PTR 32[r14], ebx
	jg	.L5
.L2:
	mov	rdi, r15
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xor	r13d, r13d
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ar8xxx_check_link_states, .-ar8xxx_check_link_states
	.comm	AR8216_PORT_STATUS_LINK_UP,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_ar8216.c_ar8xxx_check_link_states.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"down\000"
	.align	2
.LC1:
	.ascii	"up\000"
	.align	2
.LC2:
	.ascii	"Port %d is %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar8xxx_check_link_states, %function
ar8xxx_check_link_states:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	add	fp, r0, #4
	mov	r0, fp
	bl	mutex_lock
	ldr	r3, [r5, #16]
	cmp	r3, #0
	ble	.L7
	mov	r4, #0
	ldr	r6, .L13
	mov	r7, r4
	ldr	r10, .L13+4
	ldr	r8, .L13+8
	ldr	r9, .L13+12
	b	.L5
.L12:
	ldr	r3, [r5, #12]
	mov	r1, r4
	ldr	r3, [r3, #4]
	mov	r0, r5
	blx	r3
	mov	r3, r9
	ldr	r0, [r5, #8]
.L6:
	mov	r2, r4
	mov	r1, r8
	mov	r7, #1
	bl	dev_info
.L3:
	ldr	r3, [r5, #16]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L2
.L5:
	ldr	r3, [r5, #12]
	mov	r1, r4
	ldr	r3, [r3]
	mov	r0, r5
	blx	r3
	ldr	r3, [r6]
	ldr	r2, [r5]
	ands	r0, r0, r3
	movne	r3, #1
	moveq	r3, #0
	ldr	r1, [r2, r4, lsl #2]
	cmp	r1, r3
	beq	.L3
	cmp	r0, #0
	str	r3, [r2, r4, lsl #2]
	beq	.L12
	mov	r3, r10
	ldr	r0, [r5, #8]
	b	.L6
.L7:
	mov	r7, #0
.L2:
	mov	r0, fp
	bl	mutex_unlock
	mov	r0, r7
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	.align	2
.L13:
	.word	AR8216_PORT_STATUS_LINK_UP
	.word	.LC1
	.word	.LC2
	.word	.LC0
	.size	ar8xxx_check_link_states, .-ar8xxx_check_link_states
	.comm	AR8216_PORT_STATUS_LINK_UP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
