	.file	"extr_exi.c___exi_attach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__exi_attach, @function
__exi_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	rax, QWORD PTR eximap[rip]
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	lea	rbp, [rax+rdi*8]
	mov	rbx, rdi
	xor	edi, edi
	call	_CPU_ISR_Disable@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR EXI_FLAG_ATTACH[rip], eax
	je	.L2
.L4:
	xor	r12d, r12d
.L3:
	xor	edi, edi
	call	_CPU_ISR_Restore@PLT
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbx
	call	__exi_probe@PLT
	cmp	eax, 1
	jne	.L4
	xor	ecx, ecx
	xor	edx, edx
	mov	esi, 1
	mov	rdi, rbx
	call	__exi_clearirqs@PLT
	mov	DWORD PTR 4[rbp], r12d
	mov	edi, DWORD PTR IRQ_EXI0_EXT[rip]
	mov	r12d, 1
	call	IRQMASK@PLT
	lea	ecx, [rbx+rbx*2]
	shr	rax, cl
	mov	rdi, rax
	call	__UnmaskIrq@PLT
	mov	eax, DWORD PTR EXI_FLAG_ATTACH[rip]
	or	DWORD PTR 0[rbp], eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	__exi_attach, .-__exi_attach
	.comm	eximap,8,8
	.comm	IRQ_EXI0_EXT,4,4
	.comm	EXI_FLAG_ATTACH,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_exi.c___exi_attach.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__exi_attach, %function
__exi_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r3, .L7
	ldr	r9, .L7+4
	ldr	r7, [r3]
	mov	r0, #0
	mov	r8, r1
	bl	_CPU_ISR_Disable
	ldr	r3, [r7, r4, lsl #3]
	ldr	r5, [r9]
	add	r10, r7, r4, lsl #3
	ands	r5, r3, r5
	beq	.L2
.L4:
	mov	r6, #0
.L3:
	mov	r0, #0
	bl	_CPU_ISR_Restore
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mov	r0, r4
	bl	__exi_probe
	cmp	r0, #1
	mov	r6, r0
	bne	.L4
	mov	r2, r5
	mov	r1, r0
	mov	r3, r5
	mov	r0, r4
	bl	__exi_clearirqs
	ldr	r3, .L7+8
	str	r8, [r10, #4]
	ldr	r0, [r3]
	bl	IRQMASK
	add	r3, r4, r4, lsl #1
	lsr	r0, r0, r3
	bl	__UnmaskIrq
	ldr	r2, [r9]
	ldr	r3, [r7, r4, lsl #3]
	orr	r3, r3, r2
	str	r3, [r7, r4, lsl #3]
	b	.L3
.L8:
	.align	2
.L7:
	.word	eximap
	.word	EXI_FLAG_ATTACH
	.word	IRQ_EXI0_EXT
	.size	__exi_attach, .-__exi_attach
	.comm	eximap,4,4
	.comm	IRQ_EXI0_EXT,4,4
	.comm	EXI_FLAG_ATTACH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
