	.file	"extr_meson_uart.c_meson_uart_startup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	meson_uart_startup, @function
meson_uart_startup:
.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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rdi, QWORD PTR AML_UART_CONTROL[rip]
	add	rdi, QWORD PTR 16[rbx]
	call	readl@PLT
	or	eax, DWORD PTR AML_UART_CLEAR_ERR[rip]
	mov	rsi, QWORD PTR AML_UART_CONTROL[rip]
	mov	edi, eax
	add	rsi, QWORD PTR 16[rbx]
	mov	r12d, eax
	call	writel@PLT
	mov	ebp, DWORD PTR AML_UART_CLEAR_ERR[rip]
	mov	rsi, QWORD PTR AML_UART_CONTROL[rip]
	add	rsi, QWORD PTR 16[rbx]
	not	ebp
	and	r12d, ebp
	mov	edi, r12d
	call	writel@PLT
	mov	ebp, DWORD PTR AML_UART_RX_EN[rip]
	or	ebp, DWORD PTR AML_UART_TX_EN[rip]
	or	ebp, r12d
	mov	rsi, QWORD PTR AML_UART_CONTROL[rip]
	add	rsi, QWORD PTR 16[rbx]
	mov	edi, ebp
	call	writel@PLT
	mov	edi, DWORD PTR AML_UART_RX_INT_EN[rip]
	or	edi, DWORD PTR AML_UART_TX_INT_EN[rip]
	or	edi, ebp
	mov	rsi, QWORD PTR AML_UART_CONTROL[rip]
	add	rsi, QWORD PTR 16[rbx]
	call	writel@PLT
	mov	edi, 1
	call	AML_UART_RECV_IRQ@PLT
	mov	ebp, eax
	mov	eax, DWORD PTR [rbx]
	mov	edi, eax
	shr	edi, 31
	add	edi, eax
	sar	edi
	call	AML_UART_XMIT_IRQ@PLT
	mov	edi, ebp
	mov	rsi, QWORD PTR AML_UART_MISC[rip]
	add	rsi, QWORD PTR 16[rbx]
	or	edi, eax
	call	writel@PLT
	mov	ecx, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR 8[rbx]
	mov	r8, rbx
	mov	esi, DWORD PTR meson_uart_interrupt[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	edx, edx
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	request_irq@PLT
	.cfi_endproc
.LFE0:
	.size	meson_uart_startup, .-meson_uart_startup
	.comm	meson_uart_interrupt,4,4
	.comm	AML_UART_TX_INT_EN,4,4
	.comm	AML_UART_TX_EN,4,4
	.comm	AML_UART_RX_INT_EN,4,4
	.comm	AML_UART_RX_EN,4,4
	.comm	AML_UART_MISC,8,8
	.comm	AML_UART_CONTROL,8,8
	.comm	AML_UART_CLEAR_ERR,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_meson_uart.c_meson_uart_startup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	meson_uart_startup, %function
meson_uart_startup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r6, .L4
	mov	r4, r0
	ldr	r3, [r6]
	ldr	r0, [r0, #12]
	sub	sp, sp, #12
	add	r0, r0, r3
	bl	readl
	ldr	r7, .L4+4
	ldr	r3, [r6]
	ldr	r5, [r7]
	ldr	r1, [r4, #12]
	orr	r5, r0, r5
	add	r1, r1, r3
	mov	r0, r5
	bl	writel
	ldr	r0, [r7]
	ldr	r3, [r6]
	ldr	r1, [r4, #12]
	bic	r5, r5, r0
	add	r1, r1, r3
	mov	r0, r5
	bl	writel
	ldr	r2, .L4+8
	ldr	r3, .L4+12
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r1, [r4, #12]
	orr	r0, r0, r3
	ldr	r3, [r6]
	orr	r5, r0, r5
	add	r1, r1, r3
	mov	r0, r5
	bl	writel
	ldr	r2, .L4+16
	ldr	r3, .L4+20
	ldr	r0, [r2]
	ldr	r2, [r3]
	ldr	r1, [r4, #12]
	ldr	r3, [r6]
	orr	r0, r0, r2
	add	r1, r1, r3
	orr	r0, r0, r5
	bl	writel
	mov	r0, #1
	bl	AML_UART_RECV_IRQ
	ldr	r3, [r4]
	mov	r5, r0
	add	r3, r3, r3, lsr #31
	asr	r0, r3, #1
	bl	AML_UART_XMIT_IRQ
	ldr	r3, .L4+24
	ldr	r1, [r4, #12]
	ldr	r3, [r3]
	orr	r0, r5, r0
	add	r1, r1, r3
	bl	writel
	ldr	r2, .L4+28
	str	r4, [sp]
	ldr	r1, [r2]
	ldr	r3, [r4, #4]
	mov	r2, #0
	ldr	r0, [r4, #8]
	bl	request_irq
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L5:
	.align	2
.L4:
	.word	AML_UART_CONTROL
	.word	AML_UART_CLEAR_ERR
	.word	AML_UART_RX_EN
	.word	AML_UART_TX_EN
	.word	AML_UART_RX_INT_EN
	.word	AML_UART_TX_INT_EN
	.word	AML_UART_MISC
	.word	meson_uart_interrupt
	.size	meson_uart_startup, .-meson_uart_startup
	.comm	meson_uart_interrupt,4,4
	.comm	AML_UART_TX_INT_EN,4,4
	.comm	AML_UART_TX_EN,4,4
	.comm	AML_UART_RX_INT_EN,4,4
	.comm	AML_UART_RX_EN,4,4
	.comm	AML_UART_MISC,4,4
	.comm	AML_UART_CONTROL,4,4
	.comm	AML_UART_CLEAR_ERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
