	.file	"extr_if_sis.c_sis_stop.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sis_stop, @function
sis_stop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	SIS_LOCK_ASSERT@PLT
	mov	rbx, QWORD PTR 48[rbp]
	lea	rdi, 36[rbp]
	mov	QWORD PTR 40[rbp], 0
	call	callout_stop@PLT
	mov	eax, DWORD PTR IFF_DRV_RUNNING[rip]
	xor	edx, edx
	mov	rdi, rbp
	or	eax, DWORD PTR IFF_DRV_OACTIVE[rip]
	not	eax
	and	DWORD PTR [rbx], eax
	mov	esi, DWORD PTR SIS_IER[rip]
	call	CSR_WRITE_4@PLT
	mov	esi, DWORD PTR SIS_IMR[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	CSR_WRITE_4@PLT
	mov	esi, DWORD PTR SIS_ISR[rip]
	mov	rdi, rbp
	call	CSR_READ_4@PLT
	mov	esi, DWORD PTR SIS_CSR[rip]
	mov	edx, DWORD PTR SIS_CSR_TX_DISABLE[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR SIS_CSR_RX_DISABLE[rip]
	call	SIS_SETBIT@PLT
	mov	edi, 1000
	call	DELAY@PLT
	mov	esi, DWORD PTR SIS_TX_LISTPTR[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	CSR_WRITE_4@PLT
	mov	esi, DWORD PTR SIS_RX_LISTPTR[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	CSR_WRITE_4@PLT
	mov	eax, DWORD PTR SIS_FLAG_LINK[rip]
	mov	edx, DWORD PTR SIS_RX_LIST_CNT[rip]
	not	eax
	and	DWORD PTR 32[rbp], eax
	test	edx, edx
	jle	.L2
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rbx, r12
	sal	rbx, 4
	add	rbx, QWORD PTR 24[rbp]
	cmp	QWORD PTR [rbx], 0
	je	.L3
	mov	edx, DWORD PTR BUS_DMASYNC_POSTREAD[rip]
	mov	esi, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 16[rbp]
	call	bus_dmamap_sync@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 16[rbp]
	call	bus_dmamap_unload@PLT
	mov	rdi, QWORD PTR [rbx]
	call	m_freem@PLT
	mov	QWORD PTR [rbx], 0
.L3:
	add	r12, 1
	cmp	DWORD PTR SIS_RX_LIST_CNT[rip], r12d
	jg	.L4
.L2:
	mov	eax, DWORD PTR SIS_TX_LIST_CNT[rip]
	test	eax, eax
	jle	.L1
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rbx, r12
	sal	rbx, 4
	add	rbx, QWORD PTR 8[rbp]
	cmp	QWORD PTR [rbx], 0
	je	.L6
	mov	edx, DWORD PTR BUS_DMASYNC_POSTWRITE[rip]
	mov	esi, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 0[rbp]
	call	bus_dmamap_sync@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 0[rbp]
	call	bus_dmamap_unload@PLT
	mov	rdi, QWORD PTR [rbx]
	call	m_freem@PLT
	mov	QWORD PTR [rbx], 0
.L6:
	add	r12, 1
	cmp	DWORD PTR SIS_TX_LIST_CNT[rip], r12d
	jg	.L7
.L1:
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sis_stop, .-sis_stop
	.comm	SIS_TX_LIST_CNT,4,4
	.comm	SIS_TX_LISTPTR,4,4
	.comm	SIS_RX_LIST_CNT,4,4
	.comm	SIS_RX_LISTPTR,4,4
	.comm	SIS_ISR,4,4
	.comm	SIS_IMR,4,4
	.comm	SIS_IER,4,4
	.comm	SIS_FLAG_LINK,4,4
	.comm	SIS_CSR_TX_DISABLE,4,4
	.comm	SIS_CSR_RX_DISABLE,4,4
	.comm	SIS_CSR,4,4
	.comm	IFF_DRV_RUNNING,4,4
	.comm	IFF_DRV_OACTIVE,4,4
	.comm	BUS_DMASYNC_POSTWRITE,4,4
	.comm	BUS_DMASYNC_POSTREAD,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_if_sis.c_sis_stop.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sis_stop, %function
sis_stop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	mov	r4, #0
	bl	SIS_LOCK_ASSERT
	str	r4, [r5, #24]
	add	r0, r5, #20
	ldr	r6, [r5, #28]
	bl	callout_stop
	ldr	r3, .L18
	ldr	r2, .L18+4
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r6]
	orr	r2, r2, r1
	bic	r3, r3, r2
	ldr	r2, .L18+8
	str	r3, [r6]
	ldr	r1, [r2]
	mov	r0, r5
	mov	r2, r4
	bl	CSR_WRITE_4
	ldr	r3, .L18+12
	mov	r2, r4
	ldr	r1, [r3]
	mov	r0, r5
	bl	CSR_WRITE_4
	ldr	r3, .L18+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	CSR_READ_4
	ldr	r2, .L18+20
	ldr	r3, .L18+24
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L18+28
	orr	r2, r1, r2
	mov	r0, r5
	ldr	r1, [r3]
	bl	SIS_SETBIT
	mov	r0, #1000
	bl	DELAY
	ldr	r3, .L18+32
	mov	r2, r4
	ldr	r1, [r3]
	mov	r0, r5
	bl	CSR_WRITE_4
	ldr	r3, .L18+36
	mov	r2, r4
	ldr	r1, [r3]
	mov	r0, r5
	bl	CSR_WRITE_4
	ldr	r8, .L18+40
	ldr	r2, .L18+44
	ldr	r3, [r5, #16]
	ldr	r1, [r2]
	ldr	r2, [r8]
	bic	r3, r3, r1
	cmp	r2, r4
	str	r3, [r5, #16]
	ble	.L2
	mov	r10, r4
	ldr	r9, .L18+48
.L4:
	ldr	r6, [r5, #12]
	ldr	r3, [r6, r4, lsl #3]
	add	r7, r6, r4, lsl #3
	cmp	r3, #0
	beq	.L3
	ldr	r2, [r9]
	ldr	r1, [r7, #4]
	ldr	r0, [r5, #8]
	bl	bus_dmamap_sync
	ldr	r1, [r7, #4]
	ldr	r0, [r5, #8]
	bl	bus_dmamap_unload
	ldr	r0, [r6, r4, lsl #3]
	bl	m_freem
	str	r10, [r6, r4, lsl #3]
.L3:
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L4
.L2:
	ldr	r10, .L18+52
	ldr	r3, [r10]
	cmp	r3, #0
	pople	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r4, #0
	mov	r9, r4
	ldr	r8, .L18+56
.L7:
	ldr	r6, [r5, #4]
	ldr	r3, [r6, r4, lsl #3]
	add	r7, r6, r4, lsl #3
	cmp	r3, #0
	beq	.L6
	ldr	r2, [r8]
	ldr	r1, [r7, #4]
	ldr	r0, [r5]
	bl	bus_dmamap_sync
	ldr	r1, [r7, #4]
	ldr	r0, [r5]
	bl	bus_dmamap_unload
	ldr	r0, [r6, r4, lsl #3]
	bl	m_freem
	str	r9, [r6, r4, lsl #3]
.L6:
	ldr	r3, [r10]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	.align	2
.L18:
	.word	IFF_DRV_OACTIVE
	.word	IFF_DRV_RUNNING
	.word	SIS_IER
	.word	SIS_IMR
	.word	SIS_ISR
	.word	SIS_CSR_TX_DISABLE
	.word	SIS_CSR_RX_DISABLE
	.word	SIS_CSR
	.word	SIS_TX_LISTPTR
	.word	SIS_RX_LISTPTR
	.word	SIS_RX_LIST_CNT
	.word	SIS_FLAG_LINK
	.word	BUS_DMASYNC_POSTREAD
	.word	SIS_TX_LIST_CNT
	.word	BUS_DMASYNC_POSTWRITE
	.size	sis_stop, .-sis_stop
	.comm	SIS_TX_LIST_CNT,4,4
	.comm	SIS_TX_LISTPTR,4,4
	.comm	SIS_RX_LIST_CNT,4,4
	.comm	SIS_RX_LISTPTR,4,4
	.comm	SIS_ISR,4,4
	.comm	SIS_IMR,4,4
	.comm	SIS_IER,4,4
	.comm	SIS_FLAG_LINK,4,4
	.comm	SIS_CSR_TX_DISABLE,4,4
	.comm	SIS_CSR_RX_DISABLE,4,4
	.comm	SIS_CSR,4,4
	.comm	IFF_DRV_RUNNING,4,4
	.comm	IFF_DRV_OACTIVE,4,4
	.comm	BUS_DMASYNC_POSTWRITE,4,4
	.comm	BUS_DMASYNC_POSTREAD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
