	.file	"extr_rp.c_sFlushTxFIFO.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sFlushTxFIFO
	.type	sFlushTxFIFO, @function
sFlushTxFIFO:
.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	sGetTxCnt@PLT
	test	rax, rax
	je	.L1
	mov	rax, QWORD PTR 0[rbp]
	mov	r12d, DWORD PTR FALSE[rip]
	mov	eax, DWORD PTR 12[rax]
	test	DWORD PTR TX_ENABLE[rip], eax
	jne	.L13
.L4:
	mov	rdi, rbp
	mov	ebx, 20
	call	sStopRxProcessor@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR _INT_CHAN[rip]
	mov	rdi, rbp
	call	rp_readch1@PLT
	sub	ebx, 1
	jne	.L5
	mov	rdi, rbp
	call	sGetChanNum@PLT
	mov	edx, DWORD PTR RESTXFCNT[rip]
	mov	esi, DWORD PTR _CMD_REG[rip]
	mov	rdi, rbp
	mov	rbx, rax
	or	edx, eax
	call	rp_writech1@PLT
	mov	esi, DWORD PTR _CMD_REG[rip]
	mov	edx, ebx
	mov	rdi, rbp
	call	rp_writech1@PLT
	mov	edx, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR _INDX_ADDR[rip]
	mov	rdi, rbp
	call	rp_writech2@PLT
	mov	esi, DWORD PTR _INDX_DATA[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	rp_writech2@PLT
	test	r12d, r12d
	jne	.L14
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	sStartRxProcessor@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rdi, rbp
	call	sEnTransmit@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	sStartRxProcessor@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, rbp
	mov	r12d, DWORD PTR TRUE[rip]
	call	sDisTransmit@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.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	sFlushTxFIFO, .-sFlushTxFIFO
	.comm	_INT_CHAN,4,4
	.comm	_INDX_DATA,4,4
	.comm	_INDX_ADDR,4,4
	.comm	_CMD_REG,4,4
	.comm	TX_ENABLE,4,4
	.comm	TRUE,4,4
	.comm	RESTXFCNT,4,4
	.comm	FALSE,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_rp.c_sFlushTxFIFO.c"
	.text
	.align	2
	.global	sFlushTxFIFO
	.syntax unified
	.arm
	.fpu softvfp
	.type	sFlushTxFIFO, %function
sFlushTxFIFO:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	bl	sGetTxCnt
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r2, [r5]
	ldr	r3, .L14
	ldr	r2, [r2, #12]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L3
	ldr	r3, .L14+4
	ldr	r8, [r3]
.L4:
	mov	r0, r5
	bl	sStopRxProcessor
	mov	r4, #20
	ldr	r6, .L14+8
.L5:
	mov	r0, r5
	ldr	r1, [r6]
	bl	rp_readch1
	subs	r4, r4, #1
	bne	.L5
	mov	r0, r5
	bl	sGetChanNum
	mov	r6, r0
	ldr	r3, .L14+12
	ldr	r7, .L14+16
	ldr	r2, [r3]
	ldr	r1, [r7]
	orr	r2, r0, r2
	mov	r0, r5
	bl	rp_writech1
	mov	r2, r6
	ldr	r1, [r7]
	mov	r0, r5
	bl	rp_writech1
	ldr	r3, .L14+20
	ldr	r2, [r5, #4]
	ldr	r1, [r3]
	mov	r0, r5
	bl	rp_writech2
	ldr	r3, .L14+24
	mov	r2, r4
	mov	r0, r5
	ldr	r1, [r3]
	bl	rp_writech2
	cmp	r8, #0
	bne	.L13
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	sStartRxProcessor
.L3:
	ldr	r3, .L14+28
	mov	r0, r5
	ldr	r8, [r3]
	bl	sDisTransmit
	b	.L4
.L13:
	mov	r0, r5
	bl	sEnTransmit
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	sStartRxProcessor
.L15:
	.align	2
.L14:
	.word	TX_ENABLE
	.word	FALSE
	.word	_INT_CHAN
	.word	RESTXFCNT
	.word	_CMD_REG
	.word	_INDX_ADDR
	.word	_INDX_DATA
	.word	TRUE
	.size	sFlushTxFIFO, .-sFlushTxFIFO
	.comm	_INT_CHAN,4,4
	.comm	_INDX_DATA,4,4
	.comm	_INDX_ADDR,4,4
	.comm	_CMD_REG,4,4
	.comm	TX_ENABLE,4,4
	.comm	TRUE,4,4
	.comm	RESTXFCNT,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
