	.file	"extr_lib82596.c_i596_cleanup_cmd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"i596_cleanup_cmd timed out"
	.text
	.p2align 4
	.type	i596_cleanup_cmd, @function
i596_cleanup_cmd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbp, QWORD PTR 16[rsi]
	mov	rbx, rsi
	test	rbp, rbp
	je	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 8[rbp]
	sub	DWORD PTR 8[rbx], 1
	mov	edi, DWORD PTR 16[rbp]
	mov	QWORD PTR 16[rbx], rax
	call	SWAP16@PLT
	mov	rsi, rbp
	mov	edx, 24
	mov	rdi, r12
	mov	rax, QWORD PTR I596_NULL[rip]
	mov	QWORD PTR 8[rbp], 0
	mov	QWORD PTR 0[rbp], rax
	call	DMA_WBACK_INV@PLT
	mov	rbp, QWORD PTR 16[rbx]
	test	rbp, rbp
	jne	.L3
.L2:
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, r12
	mov	edx, 100
	lea	rcx, .LC0[rip]
	call	wait_cmd@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, r12
	mov	edx, 4
	mov	rax, QWORD PTR I596_NULL[rip]
	mov	QWORD PTR [rsi], rax
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	DMA_WBACK@PLT
	.cfi_endproc
.LFE0:
	.size	i596_cleanup_cmd, .-i596_cleanup_cmd
	.comm	I596_NULL,8,8
	.comm	DMA_TO_DEVICE,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_lib82596.c_i596_cleanup_cmd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"i596_cleanup_cmd timed out\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	i596_cleanup_cmd, %function
i596_cleanup_cmd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r1, #8]
	mov	r5, r1
	cmp	r4, #0
	mov	r6, r0
	ldreq	r7, .L10
	beq	.L2
	mov	r8, #0
	ldr	r7, .L10
.L3:
	ldr	r3, [r5, #4]
	ldr	r2, [r4, #4]
	sub	r3, r3, #1
	ldr	r0, [r4, #8]
	str	r3, [r5, #4]
	str	r2, [r5, #8]
	bl	SWAP16
	ldr	r3, [r7]
	mov	r1, r4
	stm	r4, {r3, r8}
	mov	r2, #12
	mov	r0, r6
	bl	DMA_WBACK_INV
	ldr	r4, [r5, #8]
	cmp	r4, #0
	bne	.L3
.L2:
	ldr	r1, [r5]
	mov	r2, #100
	mov	r0, r6
	ldr	r3, .L10+4
	bl	wait_cmd
	ldr	r1, [r5]
	ldr	r3, [r7]
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	mov	r2, #4
	str	r3, [r1]
	b	DMA_WBACK
.L11:
	.align	2
.L10:
	.word	I596_NULL
	.word	.LC0
	.size	i596_cleanup_cmd, .-i596_cleanup_cmd
	.comm	I596_NULL,4,4
	.comm	DMA_TO_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
