	.file	"extr_mtk_gpio_v2.c_mtk_gpio_intr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"spurious interrupt %d\n"
	.text
	.p2align 4
	.type	mtk_gpio_intr, @function
mtk_gpio_intr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	GPIO_PIOINT@PLT
	mov	rdi, r12
	mov	esi, eax
	call	MTK_READ_4@PLT
	test	eax, eax
	je	.L2
	mov	ebx, eax
	xor	ebp, ebp
	lea	r13, .LC0[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	add	ebp, 1
	sar	ebx
	je	.L2
.L6:
	test	bl, 1
	je	.L4
	mov	rax, QWORD PTR curthread[rip]
	mov	esi, ebp
	mov	rdi, r12
	mov	r14d, DWORD PTR [rax]
	call	PIC_INTR_ISRC@PLT
	mov	edi, eax
	mov	esi, r14d
	call	intr_isrc_dispatch@PLT
	test	rax, rax
	je	.L4
	mov	edi, DWORD PTR [r12]
	mov	edx, ebp
	mov	rsi, r13
	add	ebp, 1
	call	device_printf@PLT
	sar	ebx
	jne	.L6
.L2:
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR FILTER_HANDLED[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mtk_gpio_intr, .-mtk_gpio_intr
	.comm	curthread,8,8
	.comm	FILTER_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_mtk_gpio_v2.c_mtk_gpio_intr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"spurious interrupt %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_gpio_intr, %function
mtk_gpio_intr:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	bl	GPIO_PIOINT
	mov	r1, r0
	mov	r0, r6
	bl	MTK_READ_4
	subs	r4, r0, #0
	beq	.L2
	mov	r5, #0
	ldr	r7, .L16
	ldr	r8, .L16+4
	b	.L6
.L4:
	asrs	r4, r4, #1
	add	r5, r5, #1
	beq	.L2
.L6:
	tst	r4, #1
	beq	.L4
	mov	r1, r5
	mov	r0, r6
	bl	PIC_INTR_ISRC
	ldr	r3, [r7]
	ldr	r1, [r3]
	bl	intr_isrc_dispatch
	cmp	r0, #0
	beq	.L4
	mov	r2, r5
	mov	r1, r8
	ldr	r0, [r6]
	bl	device_printf
	asrs	r4, r4, #1
	add	r5, r5, #1
	bne	.L6
.L2:
	ldr	r3, .L16+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	.align	2
.L16:
	.word	curthread
	.word	.LC0
	.word	FILTER_HANDLED
	.size	mtk_gpio_intr, .-mtk_gpio_intr
	.comm	curthread,4,4
	.comm	FILTER_HANDLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
