	.file	"extr_4965-mac.c_il4965_txq_ctx_stop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Timeout stopping DMA channel %d [0x%08x]"
	.text
	.p2align 4
	.globl	il4965_txq_ctx_stop
	.type	il4965_txq_ctx_stop, @function
il4965_txq_ctx_stop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	edx, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR IL49_SCD_TXFACT[rip]
	call	_il_wr_prph@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L1
	xor	ebx, ebx
	lea	r13, .LC0[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	add	ebx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L1
.L4:
	mov	edi, ebx
	call	FH49_TCSR_CHNL_TX_CONFIG_REG@PLT
	xor	edx, edx
	mov	rdi, rbp
	mov	esi, eax
	call	_il_wr@PLT
	mov	edi, ebx
	call	FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE@PLT
	mov	edi, ebx
	mov	r12d, eax
	call	FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE@PLT
	mov	esi, DWORD PTR FH49_TSSR_TX_STATUS_REG[rip]
	mov	ecx, r12d
	mov	rdi, rbp
	mov	edx, eax
	mov	r8d, 1000
	call	_il_poll_bit@PLT
	test	eax, eax
	jns	.L3
	mov	esi, DWORD PTR FH49_TSSR_TX_STATUS_REG[rip]
	mov	rdi, rbp
	call	_il_rd@PLT
	mov	esi, ebx
	mov	rdi, r13
	add	ebx, 1
	mov	edx, eax
	call	IL_ERR@PLT
	cmp	DWORD PTR 0[rbp], ebx
	jg	.L4
.L1:
	add	rsp, 8
	.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
	.cfi_endproc
.LFE0:
	.size	il4965_txq_ctx_stop, .-il4965_txq_ctx_stop
	.comm	IL49_SCD_TXFACT,4,4
	.comm	FH49_TSSR_TX_STATUS_REG,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_4965-mac.c_il4965_txq_ctx_stop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Timeout stopping DMA channel %d [0x%08x]\000"
	.text
	.align	2
	.global	il4965_txq_ctx_stop
	.syntax unified
	.arm
	.fpu softvfp
	.type	il4965_txq_ctx_stop, %function
il4965_txq_ctx_stop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	ldr	r3, .L8
	mov	r2, #0
	ldr	r1, [r3]
	sub	sp, sp, #8
	bl	_il_wr_prph
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L1
	mov	r4, #0
	mov	r8, #1000
	ldr	r7, .L8+4
	ldr	r9, .L8+8
	b	.L4
.L3:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L1
.L4:
	mov	r0, r4
	bl	FH49_TCSR_CHNL_TX_CONFIG_REG
	mov	r2, #0
	mov	r1, r0
	mov	r0, r6
	bl	_il_wr
	mov	r0, r4
	ldr	r10, [r7]
	bl	FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE
	mov	r5, r0
	mov	r0, r4
	bl	FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE
	mov	r2, r5
	mov	r3, r0
	mov	r1, r10
	mov	r0, r6
	str	r8, [sp]
	bl	_il_poll_bit
	cmp	r0, #0
	bge	.L3
	ldr	r1, [r7]
	mov	r0, r6
	bl	_il_rd
	mov	r1, r4
	mov	r2, r0
	mov	r0, r9
	bl	IL_ERR
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L4
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	.align	2
.L8:
	.word	IL49_SCD_TXFACT
	.word	FH49_TSSR_TX_STATUS_REG
	.word	.LC0
	.size	il4965_txq_ctx_stop, .-il4965_txq_ctx_stop
	.comm	IL49_SCD_TXFACT,4,4
	.comm	FH49_TSSR_TX_STATUS_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
