	.file	"extr_serialio.c_spk_wait_for_xmitr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: too many timeouts, deactivating speakup\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%s: timed out (tx busy)\n"
	.text
	.p2align 4
	.globl	spk_wait_for_xmitr
	.type	spk_wait_for_xmitr, @function
spk_wait_for_xmitr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	QWORD PTR 8[rdi], 0
	mov	r12d, DWORD PTR SPK_XMITR_TIMEOUT[rip]
	je	.L9
	mov	rax, QWORD PTR NUM_DISABLE_TIMEOUTS[rip]
	cmp	QWORD PTR timeouts[rip], rax
	jl	.L9
	mov	esi, DWORD PTR [rdi]
	lea	rdi, .LC0[rip]
	xor	r12d, r12d
	call	pr_warn@PLT
	mov	QWORD PTR 8[rbx], 0
	xor	eax, eax
	call	speakup_start_ttys@PLT
	mov	eax, r12d
	mov	QWORD PTR timeouts[rip], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	sub	r12d, 1
	je	.L12
	mov	edi, 1
	call	udelay@PLT
.L9:
	xor	eax, eax
	call	spk_serial_tx_busy@PLT
	test	rax, rax
	jne	.L5
	mov	r12d, DWORD PTR SPK_CTS_TIMEOUT[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	sub	r12d, 1
	je	.L13
	mov	edi, 1
	call	udelay@PLT
.L6:
	mov	rdi, QWORD PTR UART_MSR[rip]
	add	rdi, QWORD PTR speakup_info[rip]
	call	inb_p@PLT
	test	DWORD PTR UART_MSR_CTS[rip], eax
	je	.L8
	mov	r12d, 1
	mov	QWORD PTR timeouts[rip], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	esi, DWORD PTR [rbx]
	lea	rdi, .LC1[rip]
	call	pr_warn@PLT
	add	QWORD PTR timeouts[rip], 1
	mov	eax, r12d
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	add	QWORD PTR timeouts[rip], 1
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	spk_wait_for_xmitr, .-spk_wait_for_xmitr
	.comm	timeouts,8,8
	.comm	speakup_info,8,8
	.comm	UART_MSR_CTS,4,4
	.comm	UART_MSR,8,8
	.comm	SPK_XMITR_TIMEOUT,4,4
	.comm	SPK_CTS_TIMEOUT,4,4
	.comm	NUM_DISABLE_TIMEOUTS,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_serialio.c_spk_wait_for_xmitr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: too many timeouts, deactivating speakup\012\000"
	.align	2
.LC1:
	.ascii	"%s: timed out (tx busy)\012\000"
	.text
	.align	2
	.global	spk_wait_for_xmitr
	.syntax unified
	.arm
	.fpu softvfp
	.type	spk_wait_for_xmitr, %function
spk_wait_for_xmitr:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, [r0, #4]
	ldr	r3, .L16
	cmp	r2, #0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r7, .L16+4
	ldr	r4, [r3]
	beq	.L10
	ldr	r3, .L16+8
	ldr	r2, [r7]
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L10
	mov	r6, #0
	mov	r4, r6
	ldr	r1, [r0]
	ldr	r0, .L16+12
	bl	pr_warn
	str	r6, [r5, #4]
	bl	speakup_start_ttys
	mov	r0, r4
	str	r6, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	subs	r4, r4, #1
	beq	.L14
	mov	r0, #1
	bl	udelay
.L10:
	bl	spk_serial_tx_busy
	cmp	r0, #0
	bne	.L5
	ldr	r3, .L16+16
	ldr	r8, .L16+20
	ldr	r4, [r3]
	ldr	r6, .L16+24
	ldr	r5, .L16+28
	b	.L6
.L8:
	subs	r4, r4, #1
	beq	.L15
	mov	r0, #1
	bl	udelay
.L6:
	ldr	r3, [r6]
	ldr	r0, [r8]
	add	r0, r0, r3
	bl	inb_p
	ldr	r3, [r5]
	tst	r0, r3
	beq	.L8
	mov	r3, #0
	mov	r4, #1
	str	r3, [r7]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r1, [r5]
	ldr	r0, .L16+32
	bl	pr_warn
	ldr	r3, [r7]
	mov	r0, r4
	add	r3, r3, #1
	str	r3, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	ldr	r3, [r7]
	mov	r0, r4
	add	r3, r3, #1
	str	r3, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	.align	2
.L16:
	.word	SPK_XMITR_TIMEOUT
	.word	timeouts
	.word	NUM_DISABLE_TIMEOUTS
	.word	.LC0
	.word	SPK_CTS_TIMEOUT
	.word	speakup_info
	.word	UART_MSR
	.word	UART_MSR_CTS
	.word	.LC1
	.size	spk_wait_for_xmitr, .-spk_wait_for_xmitr
	.comm	timeouts,4,4
	.comm	speakup_info,4,4
	.comm	UART_MSR_CTS,4,4
	.comm	UART_MSR,4,4
	.comm	SPK_XMITR_TIMEOUT,4,4
	.comm	SPK_CTS_TIMEOUT,4,4
	.comm	NUM_DISABLE_TIMEOUTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
