	.file	"extr_serial_lh7a40x.c_lh7a40xuart_rx_chars.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lh7a40xuart_rx_chars, @function
lh7a40xuart_rx_chars:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, 256
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 24[rdi]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 8[rsp], rax
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, DWORD PTR UART_R_STATUS[rip]
	mov	rdi, rbx
	call	UR@PLT
	test	DWORD PTR nRxRdy[rip], eax
	jne	.L13
	sub	r12d, 1
	je	.L13
	mov	esi, DWORD PTR UART_R_DATA[rip]
	mov	rdi, rbx
	call	UR@PLT
	add	DWORD PTR 20[rbx], 1
	mov	edi, DWORD PTR RxError[rip]
	mov	r13d, DWORD PTR TTY_NORMAL[rip]
	mov	ebp, eax
	and	edi, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L3
	mov	edx, DWORD PTR RxBreak[rip]
	mov	r14d, DWORD PTR RxParityError[rip]
	test	edx, ebp
	jne	.L28
	test	ebp, r14d
	je	.L8
	add	DWORD PTR 12[rbx], 1
.L7:
	test	DWORD PTR RxOverrunError[rip], ebp
	je	.L9
	add	DWORD PTR 4[rbx], 1
.L9:
	mov	eax, DWORD PTR [rbx]
	or	al, -1
	and	ebp, eax
	test	ebp, edx
	je	.L10
	mov	r13d, DWORD PTR TTY_BREAK[rip]
.L3:
	movzx	esi, bpl
	mov	rdi, rbx
	call	uart_handle_sysrq_char@PLT
	test	rax, rax
	jne	.L2
	mov	edx, DWORD PTR RxOverrunError[rip]
	mov	r8d, r13d
	mov	ecx, ebp
	mov	esi, ebp
	mov	rdi, rbx
	call	uart_insert_char@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	test	DWORD PTR RxParityError[rip], ebp
	je	.L11
	mov	r13d, DWORD PTR TTY_PARITY[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	test	DWORD PTR RxFramingError[rip], ebp
	je	.L7
	add	DWORD PTR 8[rbx], 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L28:
	add	DWORD PTR 16[rbx], 1
	mov	rdi, rbx
	mov	r15d, DWORD PTR RxFramingError[rip]
	call	uart_handle_break@PLT
	test	rax, rax
	jne	.L2
	or	r15d, r14d
	mov	edx, DWORD PTR RxBreak[rip]
	not	r15d
	and	ebp, r15d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L11:
	test	DWORD PTR RxFramingError[rip], ebp
	cmovne	r13d, DWORD PTR TTY_FRAME[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, QWORD PTR 8[rsp]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	tty_flip_buffer_push@PLT
	.cfi_endproc
.LFE0:
	.size	lh7a40xuart_rx_chars, .-lh7a40xuart_rx_chars
	.comm	nRxRdy,4,4
	.comm	UART_R_STATUS,4,4
	.comm	UART_R_DATA,4,4
	.comm	TTY_PARITY,4,4
	.comm	TTY_NORMAL,4,4
	.comm	TTY_FRAME,4,4
	.comm	TTY_BREAK,4,4
	.comm	RxParityError,4,4
	.comm	RxOverrunError,4,4
	.comm	RxFramingError,4,4
	.comm	RxError,4,4
	.comm	RxBreak,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_serial_lh7a40x.c_lh7a40xuart_rx_chars.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lh7a40xuart_rx_chars, %function
lh7a40xuart_rx_chars:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	mov	r5, #256
	ldr	r3, [r0, #24]
	sub	sp, sp, #28
	ldr	r3, [r3]
	ldr	r7, .L30
	ldr	r9, .L30+4
	ldr	r8, .L30+8
	ldr	r10, .L30+12
	str	r3, [sp, #20]
.L2:
	ldr	r3, .L30+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	UR
	ldr	r3, [r7]
	tst	r0, r3
	bne	.L13
	subs	r5, r5, #1
	beq	.L13
	ldr	r3, .L30+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	UR
	mov	fp, r0
	ldr	r2, [r4, #20]
	ldr	r0, [r9]
	ldr	r3, .L30+24
	add	r2, r2, #1
	and	r0, r0, fp
	str	r2, [r4, #20]
	ldr	r6, [r3]
	bl	unlikely
	cmp	r0, #0
	beq	.L3
	ldr	r3, .L30+28
	ldr	r2, [r10]
	ldr	r1, [r3]
	tst	r1, fp
	bne	.L29
	tst	fp, r2
	beq	.L8
	ldr	r2, [r4, #12]
	add	r2, r2, #1
	str	r2, [r4, #12]
.L7:
	ldr	r2, [r8]
	tst	fp, r2
	ldrne	r2, [r4, #4]
	addne	r2, r2, #1
	strne	r2, [r4, #4]
	ldr	r2, [r4]
	orr	r2, r2, #255
	and	fp, fp, r2
	tst	fp, r1
	beq	.L10
	ldr	r2, .L30+32
	ldr	r6, [r2]
.L3:
	mov	r0, r4
	and	r1, fp, #255
	bl	uart_handle_sysrq_char
	cmp	r0, #0
	bne	.L2
	mov	r3, fp
	mov	r1, fp
	mov	r0, r4
	ldr	r2, [r8]
	str	r6, [sp]
	bl	uart_insert_char
	b	.L2
.L10:
	ldr	r2, [r10]
	tst	fp, r2
	beq	.L11
	ldr	r2, .L30+36
	ldr	r6, [r2]
	b	.L3
.L8:
	ldr	r2, .L30+40
	ldr	r2, [r2]
	tst	fp, r2
	ldrne	r2, [r4, #8]
	addne	r2, r2, #1
	strne	r2, [r4, #8]
	b	.L7
.L29:
	ldr	r1, [r4, #16]
	ldr	ip, .L30+40
	add	r1, r1, #1
	ldr	r3, [ip]
	mov	r0, r4
	str	r1, [r4, #16]
	str	r2, [sp, #16]
	str	r3, [sp, #12]
	bl	uart_handle_break
	cmp	r0, #0
	bne	.L2
	ldr	r3, [sp, #12]
	ldr	r2, [sp, #16]
	orr	r3, r3, r2
	bic	fp, fp, r3
	ldr	r3, .L30+28
	ldr	r1, [r3]
	b	.L7
.L11:
	ldr	r2, .L30+40
	ldr	r2, [r2]
	tst	fp, r2
	ldrne	r2, .L30+44
	ldrne	r6, [r2]
	b	.L3
.L13:
	ldr	r0, [sp, #20]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	tty_flip_buffer_push
.L31:
	.align	2
.L30:
	.word	nRxRdy
	.word	RxError
	.word	RxOverrunError
	.word	RxParityError
	.word	UART_R_STATUS
	.word	UART_R_DATA
	.word	TTY_NORMAL
	.word	RxBreak
	.word	TTY_BREAK
	.word	TTY_PARITY
	.word	RxFramingError
	.word	TTY_FRAME
	.size	lh7a40xuart_rx_chars, .-lh7a40xuart_rx_chars
	.comm	nRxRdy,4,4
	.comm	UART_R_STATUS,4,4
	.comm	UART_R_DATA,4,4
	.comm	TTY_PARITY,4,4
	.comm	TTY_NORMAL,4,4
	.comm	TTY_FRAME,4,4
	.comm	TTY_BREAK,4,4
	.comm	RxParityError,4,4
	.comm	RxOverrunError,4,4
	.comm	RxFramingError,4,4
	.comm	RxError,4,4
	.comm	RxBreak,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
