	.file	"extr_sni_ave.c_ave_desc_switch.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"can't stop descriptor\n"
.LC1:
	.string	"can't suspend descriptor\n"
	.text
	.p2align 4
	.type	ave_desc_switch, @function
ave_desc_switch:
.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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	netdev_priv@PLT
	mov	rbp, rax
	cmp	ebx, 130
	je	.L2
	ja	.L3
	cmp	ebx, 128
	je	.L4
	cmp	ebx, 129
	jne	.L6
	mov	rsi, QWORD PTR AVE_DESCC[rip]
	mov	edi, DWORD PTR AVE_DESCC_TD[rip]
	add	rsi, QWORD PTR [rax]
	or	edi, DWORD PTR AVE_DESCC_RD0[rip]
	call	writel@PLT
	xor	eax, eax
.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
.L3:
	.cfi_restore_state
	cmp	ebx, 131
	jne	.L6
	mov	rdi, QWORD PTR AVE_DESCC[rip]
	add	rdi, QWORD PTR [rax]
	call	readl@PLT
	mov	edi, DWORD PTR AVE_DESCC_RDSTP[rip]
	or	edi, DWORD PTR AVE_DESCC_STATUS_MASK[rip]
	not	edi
	mov	rsi, QWORD PTR AVE_DESCC[rip]
	add	rsi, QWORD PTR 0[rbp]
	and	edi, eax
	call	writel@PLT
.L15:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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	eax, DWORD PTR EINVAL[rip]
	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
	neg	eax
	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, QWORD PTR AVE_DESCC[rip]
	add	rdi, QWORD PTR [rax]
	call	readl@PLT
	mov	r13d, DWORD PTR AVE_DESCC_STATUS_MASK[rip]
	or	eax, DWORD PTR AVE_DESCC_RDSTP[rip]
	mov	rsi, QWORD PTR AVE_DESCC[rip]
	add	rsi, QWORD PTR 0[rbp]
	not	r13d
	and	r13d, eax
	mov	edi, r13d
	call	writel@PLT
	mov	edx, DWORD PTR AVE_DESCC_RDSTP[rip]
	mov	r8d, 150000
	mov	esi, r13d
	mov	rdi, QWORD PTR AVE_DESCC[rip]
	mov	ecx, 150
	add	rdi, QWORD PTR 0[rbp]
	sal	edx, 16
	and	edx, r13d
	call	readl_poll_timeout@PLT
	test	eax, eax
	je	.L15
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	netdev_err@PLT
	mov	eax, DWORD PTR EBUSY[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	xor	edi, edi
	mov	rsi, QWORD PTR AVE_DESCC[rip]
	add	rsi, QWORD PTR [rax]
	call	writel@PLT
	mov	rdi, QWORD PTR AVE_DESCC[rip]
	xor	esi, esi
	add	rdi, QWORD PTR 0[rbp]
	mov	r8d, 15000
	mov	ecx, 150
	mov	edx, 1
	call	readl_poll_timeout@PLT
	test	eax, eax
	je	.L15
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	netdev_err@PLT
	mov	eax, DWORD PTR EBUSY[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ave_desc_switch, .-ave_desc_switch
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	AVE_DESCC_TD,4,4
	.comm	AVE_DESCC_STATUS_MASK,4,4
	.comm	AVE_DESCC_RDSTP,4,4
	.comm	AVE_DESCC_RD0,4,4
	.comm	AVE_DESCC,8,8
	.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_sni_ave.c_ave_desc_switch.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"can't stop descriptor\012\000"
	.align	2
.LC1:
	.ascii	"can't suspend descriptor\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ave_desc_switch, %function
ave_desc_switch:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	sub	sp, sp, #8
	mov	r5, r0
	bl	netdev_priv
	sub	r1, r4, #128
	mov	r4, r0
	cmp	r1, #3
	ldrls	pc, [pc, r1, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L3:
	ldr	r5, .L17
	ldr	r0, [r0]
	ldr	r3, [r5]
	add	r0, r0, r3
	bl	readl
	ldr	r2, .L17+4
	ldr	r3, .L17+8
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, [r5]
	ldr	r1, [r4]
	orr	r3, r3, ip
	add	r1, r1, r2
	bic	r0, r0, r3
	bl	writel
.L15:
	mov	r0, #0
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r6, .L17
	ldr	r1, [r0]
	ldr	r3, [r6]
	mov	r0, #0
	add	r1, r1, r3
	bl	writel
	ldr	r2, [r6]
	ldr	r0, [r4]
	ldr	r3, .L17+12
	add	r0, r0, r2
	str	r3, [sp]
	mov	r2, #1
	mov	r3, #150
	mov	r1, #0
	bl	readl_poll_timeout
	cmp	r0, #0
	beq	.L15
	mov	r0, r5
	ldr	r1, .L17+16
	bl	netdev_err
	ldr	r3, .L17+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L6:
	ldr	r2, .L17
	ldr	r0, .L17+24
	ldr	r3, .L17+28
	ldr	r1, [r4]
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r0, [r0]
	add	r1, r1, r2
	orr	r0, r0, r3
	bl	writel
	mov	r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r7, .L17
	ldr	r0, [r0]
	ldr	r3, [r7]
	ldr	r8, .L17+8
	add	r0, r0, r3
	bl	readl
	ldr	r3, .L17+4
	ldr	r6, [r8]
	ldr	r2, [r3]
	ldr	r1, [r4]
	ldr	r3, [r7]
	orr	r6, r0, r6
	bic	r6, r6, r2
	add	r1, r1, r3
	mov	r0, r6
	bl	writel
	ldr	ip, [r4]
	ldr	r2, [r8]
	ldr	r0, [r7]
	ldr	r3, .L17+32
	mov	r1, r6
	str	r3, [sp]
	and	r2, r6, r2, lsl #16
	mov	r3, #150
	add	r0, ip, r0
	bl	readl_poll_timeout
	cmp	r0, #0
	beq	.L15
	mov	r0, r5
	ldr	r1, .L17+36
	bl	netdev_err
	ldr	r3, .L17+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L2:
	ldr	r3, .L17+40
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L18:
	.align	2
.L17:
	.word	AVE_DESCC
	.word	AVE_DESCC_STATUS_MASK
	.word	AVE_DESCC_RDSTP
	.word	15000
	.word	.LC0
	.word	EBUSY
	.word	AVE_DESCC_TD
	.word	AVE_DESCC_RD0
	.word	150000
	.word	.LC1
	.word	EINVAL
	.size	ave_desc_switch, .-ave_desc_switch
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	AVE_DESCC_TD,4,4
	.comm	AVE_DESCC_STATUS_MASK,4,4
	.comm	AVE_DESCC_RDSTP,4,4
	.comm	AVE_DESCC_RD0,4,4
	.comm	AVE_DESCC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
