	.file	"extr_apbuart.c_apbuart_scan_fifo_size.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	apbuart_scan_fifo_size, @function
apbuart_scan_fifo_size:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	UART_GET_CTRL@PLT
	xor	edi, edi
	mov	ebp, eax
	call	local_irq_save@PLT
	mov	esi, DWORD PTR UART_CTRL_TE[rip]
	mov	rdi, r12
	or	esi, ebp
	call	UART_PUT_CTRL@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, r12
	call	UART_GET_STATUS@PLT
	mov	edi, eax
	call	UART_TX_READY@PLT
	test	eax, eax
	je	.L2
	mov	esi, DWORD PTR UART_CTRL_TE[rip]
	mov	rdi, r12
	not	esi
	and	esi, ebp
	call	UART_PUT_CTRL@PLT
	xor	esi, esi
	mov	rdi, r12
	call	UART_PUT_CHAR@PLT
	mov	rdi, r12
	call	UART_GET_STATUS@PLT
	sar	eax, 20
	mov	ebx, eax
	and	ebx, 63
	cmp	ebx, 1
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	xor	esi, esi
	mov	rdi, r12
	mov	r13d, ebx
	call	UART_PUT_CHAR@PLT
	mov	rdi, r12
	lea	ebx, 1[rbx]
	call	UART_GET_STATUS@PLT
	sar	eax, 20
	and	eax, 63
	cmp	eax, ebx
	je	.L4
	mov	esi, ebp
	mov	rdi, r12
	call	UART_PUT_CTRL@PLT
	xor	edi, edi
	call	local_irq_restore@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	esi, ebp
	mov	rdi, r12
	mov	r13d, 1
	call	UART_PUT_CTRL@PLT
	xor	edi, edi
	call	local_irq_restore@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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	apbuart_scan_fifo_size, .-apbuart_scan_fifo_size
	.comm	UART_CTRL_TE,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_apbuart.c_apbuart_scan_fifo_size.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	apbuart_scan_fifo_size, %function
apbuart_scan_fifo_size:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	bl	UART_GET_CTRL
	mov	r6, r0
	ldr	r5, .L12
	mov	r0, #0
	bl	local_irq_save
	ldr	r1, [r5]
	mov	r0, r4
	orr	r1, r6, r1
	bl	UART_PUT_CTRL
.L2:
	mov	r0, r4
	bl	UART_GET_STATUS
	bl	UART_TX_READY
	cmp	r0, #0
	beq	.L2
	ldr	r1, [r5]
	mov	r0, r4
	bic	r1, r6, r1
	bl	UART_PUT_CTRL
	mov	r1, #0
	mov	r0, r4
	bl	UART_PUT_CHAR
	mov	r0, r4
	bl	UART_GET_STATUS
	asr	r5, r0, #20
	and	r5, r5, #63
	cmp	r5, #1
	bne	.L3
.L4:
	mov	r1, #0
	mov	r0, r4
	bl	UART_PUT_CHAR
	mov	r0, r4
	bl	UART_GET_STATUS
	asr	r3, r0, #20
	mov	r7, r5
	and	r3, r3, #63
	add	r5, r5, #1
	cmp	r3, r5
	beq	.L4
	mov	r1, r6
	mov	r0, r4
	bl	UART_PUT_CTRL
	mov	r0, #0
	bl	local_irq_restore
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	mov	r7, #1
	mov	r1, r6
	mov	r0, r4
	bl	UART_PUT_CTRL
	mov	r0, #0
	bl	local_irq_restore
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	UART_CTRL_TE
	.size	apbuart_scan_fifo_size, .-apbuart_scan_fifo_size
	.comm	UART_CTRL_TE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
