	.file	"extr_mt76x02_mmio.c_mt76x02_irq_handler.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mt76x02_irq_handler
	.type	mt76x02_irq_handler, @function
mt76x02_irq_handler:
.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 MT_INT_SOURCE_CSR[rip]
	call	mt76_rr@PLT
	mov	esi, DWORD PTR MT_INT_SOURCE_CSR[rip]
	mov	rdi, rbp
	mov	edx, eax
	mov	ebx, eax
	call	mt76_wr@PLT
	mov	edi, DWORD PTR MT76_STATE_INITIALIZED[rip]
	lea	rsi, 52[rbp]
	call	test_bit@PLT
	test	eax, 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	edx, DWORD PTR 48[rbp]
	mov	esi, ebx
	mov	rdi, rbp
	call	trace_dev_irq@PLT
	xor	edi, edi
	and	ebx, DWORD PTR 48[rbp]
	call	MT_INT_RX_DONE@PLT
	test	eax, ebx
	jne	.L35
.L4:
	mov	edi, 1
	call	MT_INT_RX_DONE@PLT
	test	eax, ebx
	jne	.L36
.L5:
	test	DWORD PTR MT_INT_PRE_TBTT[rip], ebx
	jne	.L37
.L6:
	test	DWORD PTR MT_INT_TBTT[rip], ebx
	je	.L7
	cmp	QWORD PTR 24[rbp], 0
	je	.L8
	lea	rdi, 8[rbp]
	call	mt76_csa_finish@PLT
.L7:
	mov	eax, DWORD PTR MT_INT_TX_STAT[rip]
	test	eax, ebx
	jne	.L38
.L9:
	mov	esi, DWORD PTR MT_INT_TX_DONE_ALL[rip]
	or	eax, esi
	test	eax, ebx
	jne	.L39
.L10:
	mov	esi, DWORD PTR MT_INT_GPTIMER[rip]
	test	esi, ebx
	jne	.L40
.L11:
	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
.L8:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rbp]
	mov	rdx, QWORD PTR MT_TXQ_PSD[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR [rax+rdx*4]
	call	mt76_queue_kick@PLT
	mov	eax, DWORD PTR MT_INT_TX_STAT[rip]
	test	eax, ebx
	je	.L9
.L38:
	mov	esi, 1
	mov	rdi, rbp
	call	mt76x02_mac_poll_tx_status@PLT
	mov	eax, DWORD PTR MT_INT_TX_STAT[rip]
	mov	esi, DWORD PTR MT_INT_TX_DONE_ALL[rip]
	or	eax, esi
	test	eax, ebx
	je	.L10
.L39:
	mov	rdi, rbp
	call	mt76x02_irq_disable@PLT
	lea	rdi, 8[rbp]
	call	napi_schedule@PLT
	mov	esi, DWORD PTR MT_INT_GPTIMER[rip]
	test	esi, ebx
	je	.L11
.L40:
	mov	rdi, rbp
	call	mt76x02_irq_disable@PLT
	mov	rdi, rbp
	call	tasklet_schedule@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L37:
	lea	rdi, 32[rbp]
	call	tasklet_schedule@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edi, 1
	call	MT_INT_RX_DONE@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	mt76x02_irq_disable@PLT
	mov	rax, QWORD PTR 40[rbp]
	lea	rdi, 4[rax]
	call	napi_schedule@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L35:
	xor	edi, edi
	call	MT_INT_RX_DONE@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	mt76x02_irq_disable@PLT
	mov	rdi, QWORD PTR 40[rbp]
	call	napi_schedule@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	mt76x02_irq_handler, .-mt76x02_irq_handler
	.comm	MT_TXQ_PSD,8,8
	.comm	MT_INT_TX_STAT,4,4
	.comm	MT_INT_TX_DONE_ALL,4,4
	.comm	MT_INT_TBTT,4,4
	.comm	MT_INT_SOURCE_CSR,4,4
	.comm	MT_INT_PRE_TBTT,4,4
	.comm	MT_INT_GPTIMER,4,4
	.comm	MT76_STATE_INITIALIZED,4,4
	.comm	IRQ_NONE,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_mt76x02_mmio.c_mt76x02_irq_handler.c"
	.text
	.align	2
	.global	mt76x02_irq_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt76x02_irq_handler, %function
mt76x02_irq_handler:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L41
	mov	r4, r1
	mov	r0, r1
	ldr	r1, [r6]
	bl	mt76_rr
	ldr	r1, [r6]
	mov	r2, r0
	mov	r5, r0
	mov	r0, r4
	bl	mt76_wr
	ldr	r3, .L41+4
	add	r1, r4, #28
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L41+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L2:
	mov	r1, r5
	ldr	r2, [r4, #24]
	mov	r0, r4
	bl	trace_dev_irq
	ldr	r3, [r4, #24]
	mov	r0, #0
	and	r5, r5, r3
	bl	MT_INT_RX_DONE
	tst	r0, r5
	bne	.L35
.L4:
	mov	r0, #1
	bl	MT_INT_RX_DONE
	tst	r0, r5
	bne	.L36
.L5:
	ldr	r3, .L41+12
	ldr	r3, [r3]
	tst	r5, r3
	bne	.L37
.L6:
	ldr	r3, .L41+16
	ldr	r3, [r3]
	tst	r5, r3
	beq	.L7
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L8
	add	r0, r4, #4
	bl	mt76_csa_finish
.L7:
	ldr	r6, .L41+20
	ldr	r3, [r6]
	tst	r3, r5
	bne	.L38
.L9:
	ldr	r2, .L41+24
	ldr	r1, [r2]
	orr	r3, r1, r3
	tst	r3, r5
	bne	.L39
.L10:
	ldr	r3, .L41+28
	ldr	r1, [r3]
	tst	r1, r5
	bne	.L40
.L11:
	ldr	r3, .L41+32
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r2, .L41+36
	ldr	r3, [r4, #8]
	ldr	r2, [r2]
	ldr	r6, .L41+20
	ldr	r1, [r3, r2, lsl #2]
	mov	r0, r4
	bl	mt76_queue_kick
	ldr	r3, [r6]
	tst	r3, r5
	beq	.L9
.L38:
	mov	r1, #1
	mov	r0, r4
	bl	mt76x02_mac_poll_tx_status
	ldr	r3, [r6]
	b	.L9
.L37:
	add	r0, r4, #16
	bl	tasklet_schedule
	b	.L6
.L36:
	mov	r0, #1
	bl	MT_INT_RX_DONE
	mov	r1, r0
	mov	r0, r4
	bl	mt76x02_irq_disable
	ldr	r0, [r4, #20]
	add	r0, r0, #4
	bl	napi_schedule
	b	.L5
.L35:
	mov	r0, #0
	bl	MT_INT_RX_DONE
	mov	r1, r0
	mov	r0, r4
	bl	mt76x02_irq_disable
	ldr	r0, [r4, #20]
	bl	napi_schedule
	b	.L4
.L40:
	mov	r0, r4
	bl	mt76x02_irq_disable
	mov	r0, r4
	bl	tasklet_schedule
	b	.L11
.L39:
	mov	r0, r4
	bl	mt76x02_irq_disable
	add	r0, r4, #4
	bl	napi_schedule
	b	.L10
.L42:
	.align	2
.L41:
	.word	MT_INT_SOURCE_CSR
	.word	MT76_STATE_INITIALIZED
	.word	IRQ_NONE
	.word	MT_INT_PRE_TBTT
	.word	MT_INT_TBTT
	.word	MT_INT_TX_STAT
	.word	MT_INT_TX_DONE_ALL
	.word	MT_INT_GPTIMER
	.word	IRQ_HANDLED
	.word	MT_TXQ_PSD
	.size	mt76x02_irq_handler, .-mt76x02_irq_handler
	.comm	MT_TXQ_PSD,4,4
	.comm	MT_INT_TX_STAT,4,4
	.comm	MT_INT_TX_DONE_ALL,4,4
	.comm	MT_INT_TBTT,4,4
	.comm	MT_INT_SOURCE_CSR,4,4
	.comm	MT_INT_PRE_TBTT,4,4
	.comm	MT_INT_GPTIMER,4,4
	.comm	MT76_STATE_INITIALIZED,4,4
	.comm	IRQ_NONE,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
