	.file	"extr_uartlite.c_ulite_transmit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ulite_transmit, @function
ulite_transmit:
.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
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	test	DWORD PTR ULITE_STATUS_TXFULL[rip], esi
	jne	.L5
	mov	rbp, rdi
	mov	rdi, QWORD PTR 16[rdi]
	test	rdi, rdi
	jne	.L9
	mov	r12, QWORD PTR 24[rbp]
	mov	rdi, r12
	call	uart_circ_empty@PLT
	test	rax, rax
	jne	.L5
	mov	rdi, rbp
	call	uart_tx_stopped@PLT
	test	rax, rax
	je	.L10
	.p2align 4,,10
	.p2align 3
.L5:
	xor	r12d, r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rsi, QWORD PTR ULITE_TX[rip]
	add	rsi, QWORD PTR 8[rbp]
	mov	r12d, 1
	call	writeb@PLT
	add	DWORD PTR 0[rbp], 1
	mov	eax, r12d
	mov	QWORD PTR 16[rbp], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdx, QWORD PTR [r12]
	mov	rax, QWORD PTR 8[r12]
	mov	rsi, QWORD PTR ULITE_TX[rip]
	add	rsi, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [rax+rdx*8]
	call	writeb@PLT
	mov	ecx, DWORD PTR UART_XMIT_SIZE[rip]
	mov	rax, QWORD PTR [r12]
	mov	rdi, r12
	lea	edx, -1[rcx]
	add	rax, 1
	movsx	rdx, edx
	and	rax, rdx
	mov	QWORD PTR [r12], rax
	mov	r12d, 1
	add	DWORD PTR 0[rbp], 1
	call	uart_circ_chars_pending@PLT
	cmp	rax, QWORD PTR WAKEUP_CHARS[rip]
	jge	.L1
	mov	rdi, rbp
	call	uart_write_wakeup@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ulite_transmit, .-ulite_transmit
	.comm	WAKEUP_CHARS,8,8
	.comm	ULITE_TX,8,8
	.comm	ULITE_STATUS_TXFULL,4,4
	.comm	UART_XMIT_SIZE,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_uartlite.c_ulite_transmit.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ulite_transmit, %function
ulite_transmit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L12
	push	{r4, r5, r6, lr}
	ldr	r5, [r3]
	ands	r5, r1, r5
	bne	.L5
	mov	r4, r0
	ldr	r0, [r0, #8]
	cmp	r0, #0
	bne	.L9
	ldr	r5, [r4, #12]
	mov	r0, r5
	bl	uart_circ_empty
	cmp	r0, #0
	bne	.L5
	mov	r0, r4
	bl	uart_tx_stopped
	cmp	r0, #0
	beq	.L10
.L5:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L9:
	ldr	r3, .L12+4
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	writeb
	ldr	r3, [r4]
	mov	r0, #1
	add	r3, r3, #1
	str	r5, [r4, #8]
	str	r3, [r4]
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r3, .L12+4
	ldr	r0, [r4, #4]
	ldr	r1, [r3]
	ldm	r5, {r2, r3}
	add	r1, r0, r1
	ldr	r0, [r3, r2, lsl #2]
	bl	writeb
	ldr	r2, .L12+8
	ldr	r3, [r5]
	ldr	r1, [r2]
	ldr	r2, [r4]
	sub	r1, r1, #1
	add	r3, r3, #1
	and	r3, r3, r1
	add	r2, r2, #1
	str	r3, [r5]
	mov	r0, r5
	str	r2, [r4]
	bl	uart_circ_chars_pending
	ldr	r3, .L12+12
	ldr	r3, [r3]
	cmp	r0, r3
	blt	.L11
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L11:
	mov	r0, r4
	bl	uart_write_wakeup
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L13:
	.align	2
.L12:
	.word	ULITE_STATUS_TXFULL
	.word	ULITE_TX
	.word	UART_XMIT_SIZE
	.word	WAKEUP_CHARS
	.size	ulite_transmit, .-ulite_transmit
	.comm	WAKEUP_CHARS,4,4
	.comm	ULITE_TX,4,4
	.comm	ULITE_STATUS_TXFULL,4,4
	.comm	UART_XMIT_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
