	.file	"extr_leon_kernel.c_leon_build_device_irq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	leon_build_device_irq
	.type	leon_build_device_irq, @function
leon_build_device_irq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, ecx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	leon_get_irqmask@PLT
	test	rax, rax
	jne	.L2
.L4:
	xor	r15d, r15d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, ebp
	mov	edi, ebp
	mov	r12, rax
	call	irq_alloc@PLT
	mov	r15d, eax
	test	eax, eax
	je	.L4
	test	ebx, ebx
	jne	.L21
.L5:
	mov	edi, r15d
	call	irq_to_desc@PLT
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L22
.L6:
.L3:
	endbr64
	mov	edi, r15d
	mov	rcx, r14
	lea	rsi, leon_irq[rip]
	mov	edx, r13d
	call	irq_set_chip_and_handler_name@PLT
	mov	rsi, r12
	mov	edi, r15d
	call	irq_set_chip_data@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	or	r12, QWORD PTR LEON_DO_ACK_HW[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	cmp	rax, QWORD PTR handle_bad_irq[rip]
	jne	.L1
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	leon_build_device_irq, .-leon_build_device_irq
	.comm	leon_irq,4,4
	.comm	handle_bad_irq,8,8
	.comm	LEON_DO_ACK_HW,8,8
	.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_leon_kernel.c_leon_build_device_irq.c"
	.text
	.align	2
	.global	leon_build_device_irq
	.syntax unified
	.arm
	.fpu softvfp
	.type	leon_build_device_irq, %function
leon_build_device_irq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r7, r2
	mov	r8, r3
	mov	r4, r0
	bl	leon_get_irqmask
	subs	r5, r0, #0
	bne	.L2
.L4:
	mov	r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r1, r4
	mov	r0, r4
	bl	irq_alloc
	subs	r4, r0, #0
	beq	.L4
	cmp	r8, #0
	ldrne	r3, .L22
	mov	r0, r4
	ldrne	r3, [r3]
	orrne	r5, r5, r3
	bl	irq_to_desc
	cmp	r0, #0
	beq	.L6
	ldr	r3, [r0]
	cmp	r3, #0
	bne	.L21
.L6:
.L3:
	mov	r3, r7
	mov	r2, r6
	mov	r0, r4
	ldr	r1, .L22+4
	bl	irq_set_chip_and_handler_name
	mov	r1, r5
	mov	r0, r4
	bl	irq_set_chip_data
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L21:
	ldr	r2, .L22+8
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L1
	b	.L6
.L23:
	.align	2
.L22:
	.word	LEON_DO_ACK_HW
	.word	leon_irq
	.word	handle_bad_irq
	.size	leon_build_device_irq, .-leon_build_device_irq
	.comm	leon_irq,4,4
	.comm	handle_bad_irq,4,4
	.comm	LEON_DO_ACK_HW,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
