	.file	"extr_ar933x_uart.c_ar933x_uart_interrupt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ar933x_uart_interrupt, @function
ar933x_uart_interrupt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rdi, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	esi, DWORD PTR AR933X_UART_CS_REG[rip]
	call	ar933x_uart_read@PLT
	test	DWORD PTR AR933X_UART_CS_HOST_INT[rip], eax
	jne	.L2
	mov	eax, DWORD PTR IRQ_NONE[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	spin_lock@PLT
	mov	esi, DWORD PTR AR933X_UART_INT_REG[rip]
	mov	rdi, rbp
	call	ar933x_uart_read@PLT
	mov	esi, DWORD PTR AR933X_UART_INT_EN_REG[rip]
	mov	rdi, rbp
	mov	ebx, eax
	call	ar933x_uart_read@PLT
	mov	edx, DWORD PTR AR933X_UART_INT_RX_VALID[rip]
	and	ebx, eax
	test	edx, ebx
	jne	.L14
	mov	edx, DWORD PTR AR933X_UART_INT_TX_EMPTY[rip]
	test	edx, ebx
	jne	.L15
.L5:
	mov	rdi, rbp
	call	spin_unlock@PLT
	mov	eax, DWORD PTR IRQ_HANDLED[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	esi, DWORD PTR AR933X_UART_INT_REG[rip]
	mov	rdi, rbp
	call	ar933x_uart_write@PLT
	mov	rdi, rbp
	call	ar933x_uart_rx_chars@PLT
	mov	edx, DWORD PTR AR933X_UART_INT_TX_EMPTY[rip]
	test	edx, ebx
	je	.L5
.L15:
	mov	esi, DWORD PTR AR933X_UART_INT_REG[rip]
	mov	rdi, rbp
	call	ar933x_uart_write@PLT
	mov	rdi, rbp
	call	ar933x_uart_stop_tx_interrupt@PLT
	mov	rdi, rbp
	call	ar933x_uart_tx_chars@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ar933x_uart_interrupt, .-ar933x_uart_interrupt
	.comm	IRQ_NONE,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	AR933X_UART_INT_TX_EMPTY,4,4
	.comm	AR933X_UART_INT_RX_VALID,4,4
	.comm	AR933X_UART_INT_REG,4,4
	.comm	AR933X_UART_INT_EN_REG,4,4
	.comm	AR933X_UART_CS_REG,4,4
	.comm	AR933X_UART_CS_HOST_INT,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_ar933x_uart.c_ar933x_uart_interrupt.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar933x_uart_interrupt, %function
ar933x_uart_interrupt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L16
	mov	r0, r1
	push	{r4, r5, r6, lr}
	mov	r4, r1
	ldr	r1, [r3]
	bl	ar933x_uart_read
	ldr	r3, .L16+4
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L2
	ldr	r3, .L16+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r6, .L16+12
	mov	r0, r4
	bl	spin_lock
	ldr	r1, [r6]
	mov	r0, r4
	bl	ar933x_uart_read
	ldr	r3, .L16+16
	mov	r5, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	ar933x_uart_read
	ldr	r3, .L16+20
	and	r5, r5, r0
	ldr	r2, [r3]
	tst	r2, r5
	bne	.L14
	ldr	r3, .L16+24
	ldr	r2, [r3]
	tst	r2, r5
	bne	.L15
.L5:
	mov	r0, r4
	bl	spin_unlock
	ldr	r3, .L16+28
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L14:
	ldr	r1, [r6]
	mov	r0, r4
	bl	ar933x_uart_write
	mov	r0, r4
	bl	ar933x_uart_rx_chars
	ldr	r3, .L16+24
	ldr	r2, [r3]
	tst	r2, r5
	beq	.L5
.L15:
	ldr	r1, [r6]
	mov	r0, r4
	bl	ar933x_uart_write
	mov	r0, r4
	bl	ar933x_uart_stop_tx_interrupt
	mov	r0, r4
	bl	ar933x_uart_tx_chars
	b	.L5
.L17:
	.align	2
.L16:
	.word	AR933X_UART_CS_REG
	.word	AR933X_UART_CS_HOST_INT
	.word	IRQ_NONE
	.word	AR933X_UART_INT_REG
	.word	AR933X_UART_INT_EN_REG
	.word	AR933X_UART_INT_RX_VALID
	.word	AR933X_UART_INT_TX_EMPTY
	.word	IRQ_HANDLED
	.size	ar933x_uart_interrupt, .-ar933x_uart_interrupt
	.comm	IRQ_NONE,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	AR933X_UART_INT_TX_EMPTY,4,4
	.comm	AR933X_UART_INT_RX_VALID,4,4
	.comm	AR933X_UART_INT_REG,4,4
	.comm	AR933X_UART_INT_EN_REG,4,4
	.comm	AR933X_UART_CS_REG,4,4
	.comm	AR933X_UART_CS_HOST_INT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
