	.file	"extr_rk3399_vpu_hw.c_rk3399_vepu_irq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rk3399_vepu_irq, @function
rk3399_vepu_irq:
.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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	mov	esi, DWORD PTR VEPU_REG_INTERRUPT[rip]
	mov	rdi, rbp
	call	vepu_read@PLT
	mov	esi, DWORD PTR VEPU_REG_STR_BUF_LIMIT[rip]
	mov	rdi, rbp
	mov	r13d, eax
	call	vepu_read@PLT
	mov	edx, DWORD PTR VEPU_REG_INTERRUPT[rip]
	mov	rdi, rbp
	test	eax, eax
	lea	r12d, 7[rax]
	cmovns	r12d, eax
	sar	r12d, 3
	test	DWORD PTR VEPU_REG_INTERRUPT_FRAME_READY[rip], r13d
	mov	r13d, DWORD PTR VB2_BUF_STATE_DONE[rip]
	cmove	r13d, DWORD PTR VB2_BUF_STATE_ERROR[rip]
	xor	esi, esi
	call	vepu_write@PLT
	mov	edx, DWORD PTR VEPU_REG_AXI_CTRL[rip]
	mov	rdi, rbp
	xor	esi, esi
	call	vepu_write@PLT
	mov	edx, r13d
	mov	esi, r12d
	mov	rdi, rbp
	call	hantro_irq_done@PLT
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR IRQ_HANDLED[rip]
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	rk3399_vepu_irq, .-rk3399_vepu_irq
	.comm	VEPU_REG_STR_BUF_LIMIT,4,4
	.comm	VEPU_REG_INTERRUPT_FRAME_READY,4,4
	.comm	VEPU_REG_INTERRUPT,4,4
	.comm	VEPU_REG_AXI_CTRL,4,4
	.comm	VB2_BUF_STATE_ERROR,4,4
	.comm	VB2_BUF_STATE_DONE,4,4
	.comm	IRQ_HANDLED,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_rk3399_vpu_hw.c_rk3399_vepu_irq.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rk3399_vepu_irq, %function
rk3399_vepu_irq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L6
	mov	r5, r1
	mov	r0, r1
	ldr	r1, [r7]
	bl	vepu_read
	ldr	r3, .L6+4
	mov	r6, r0
	ldr	r1, [r3]
	mov	r0, r5
	bl	vepu_read
	cmp	r0, #0
	add	r4, r0, #7
	movge	r4, r0
	ldr	r3, .L6+8
	ldr	r2, [r7]
	ldr	r3, [r3]
	mov	r1, #0
	tst	r6, r3
	ldrne	r3, .L6+12
	ldreq	r3, .L6+16
	mov	r0, r5
	ldr	r6, [r3]
	bl	vepu_write
	ldr	r3, .L6+20
	mov	r1, #0
	ldr	r2, [r3]
	mov	r0, r5
	asr	r4, r4, #3
	bl	vepu_write
	mov	r2, r6
	mov	r1, r4
	mov	r0, r5
	bl	hantro_irq_done
	ldr	r3, .L6+24
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	.align	2
.L6:
	.word	VEPU_REG_INTERRUPT
	.word	VEPU_REG_STR_BUF_LIMIT
	.word	VEPU_REG_INTERRUPT_FRAME_READY
	.word	VB2_BUF_STATE_DONE
	.word	VB2_BUF_STATE_ERROR
	.word	VEPU_REG_AXI_CTRL
	.word	IRQ_HANDLED
	.size	rk3399_vepu_irq, .-rk3399_vepu_irq
	.comm	VEPU_REG_STR_BUF_LIMIT,4,4
	.comm	VEPU_REG_INTERRUPT_FRAME_READY,4,4
	.comm	VEPU_REG_INTERRUPT,4,4
	.comm	VEPU_REG_AXI_CTRL,4,4
	.comm	VB2_BUF_STATE_ERROR,4,4
	.comm	VB2_BUF_STATE_DONE,4,4
	.comm	IRQ_HANDLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
