	.file	"extr_ntb_hw_switchtec.c_switchtec_ntb_init_db_msg_irq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"irqs - event: %d, db: %d, msgs: %d\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"switchtec_ntb_doorbell"
.LC2:
	.string	"switchtec_ntb_message"
	.text
	.p2align 4
	.type	switchtec_ntb_init_db_msg_irq, @function
switchtec_ntb_init_db_msg_irq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR 16[rdi]
	mov	rdi, QWORD PTR 8[rax]
	call	ioread32@PLT
	test	eax, eax
	mov	edx, eax
	sete	r13b
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L10:
	add	ebp, 1
	cmp	ebp, r13d
	je	.L10
	cmp	edx, ebp
	je	.L10
	mov	rax, QWORD PTR 16[r12]
	mov	r8d, ebp
	mov	ecx, r13d
	xor	ebx, ebx
	lea	rsi, .LC0[rip]
	lea	rdi, 4[rax]
	call	dev_dbg@PLT
.L3:
	mov	rax, QWORD PTR 24[r12]
	mov	edi, r13d
	mov	rsi, QWORD PTR [rax]
	add	rsi, rbx
	add	rbx, 4
	call	iowrite8@PLT
	cmp	rbx, 16
	jne	.L3
.L4:
	mov	rax, QWORD PTR 24[r12]
	mov	edi, ebp
	mov	rsi, QWORD PTR [rax]
	add	rsi, rbx
	add	rbx, 4
	call	iowrite8@PLT
	cmp	rbx, 32
	jne	.L4
	mov	rax, QWORD PTR 16[r12]
	mov	esi, r13d
	mov	edi, DWORD PTR [rax]
	call	pci_irq_vector@PLT
	mov	esi, ebp
	mov	QWORD PTR [r12], rax
	mov	rax, QWORD PTR 16[r12]
	mov	edi, DWORD PTR [rax]
	call	pci_irq_vector@PLT
	mov	esi, DWORD PTR switchtec_ntb_doorbell_isr[rip]
	mov	r8, r12
	xor	edx, edx
	mov	QWORD PTR 8[r12], rax
	mov	rdi, QWORD PTR [r12]
	lea	rcx, .LC1[rip]
	call	request_irq@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L14
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[r12]
	mov	esi, DWORD PTR switchtec_ntb_message_isr[rip]
	mov	r8, r12
	xor	edx, edx
	lea	rcx, .LC2[rip]
	call	request_irq@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L1
	mov	rdi, QWORD PTR [r12]
	mov	rsi, r12
	call	free_irq@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	switchtec_ntb_init_db_msg_irq, .-switchtec_ntb_init_db_msg_irq
	.comm	switchtec_ntb_message_isr,4,4
	.comm	switchtec_ntb_doorbell_isr,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_ntb_hw_switchtec.c_switchtec_ntb_init_db_msg_irq.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"irqs - event: %d, db: %d, msgs: %d\012\000"
	.align	2
.LC1:
	.ascii	"switchtec_ntb_doorbell\000"
	.align	2
.LC2:
	.ascii	"switchtec_ntb_message\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	switchtec_ntb_init_db_msg_irq, %function
switchtec_ntb_init_db_msg_irq:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, [r0, #8]
	mov	r7, r0
	sub	sp, sp, #20
	ldr	r0, [r3, #8]
	bl	ioread32
	clz	r6, r0
	mov	r4, #0
	mov	r2, r0
	lsr	r6, r6, #5
.L2:
	add	r4, r4, #1
	cmp	r2, r4
	cmpne	r4, r6
	moveq	r5, #1
	movne	r5, #0
	beq	.L2
	ldr	r0, [r7, #8]
	mov	r3, r6
	ldr	r1, .L13
	str	r4, [sp]
	add	r0, r0, #4
	bl	dev_dbg
.L3:
	ldr	r3, [r7, #12]
	mov	r0, r4
	ldr	r1, [r3]
	add	r1, r1, r5
	add	r5, r5, #4
	bl	iowrite8
	cmp	r5, #16
	bne	.L3
	ldr	r3, [r7, #8]
	mov	r1, r6
	ldr	r0, [r3]
	bl	pci_irq_vector
	ldr	r3, [r7, #8]
	mov	r1, r4
	str	r0, [r7]
	ldr	r0, [r3]
	bl	pci_irq_vector
	ldr	r3, .L13+4
	str	r0, [r7, #4]
	str	r7, [sp]
	mov	r2, #0
	ldr	r1, [r3]
	ldr	r0, [r7]
	ldr	r3, .L13+8
	bl	request_irq
	subs	r2, r0, #0
	beq	.L12
.L1:
	mov	r0, r2
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L12:
	ldr	r3, .L13+12
	str	r7, [sp]
	ldr	r1, [r3]
	ldr	r0, [r7, #4]
	ldr	r3, .L13+16
	bl	request_irq
	subs	r2, r0, #0
	beq	.L1
	mov	r1, r7
	ldr	r0, [r7]
	str	r2, [sp, #12]
	bl	free_irq
	ldr	r2, [sp, #12]
	b	.L1
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	switchtec_ntb_doorbell_isr
	.word	.LC1
	.word	switchtec_ntb_message_isr
	.word	.LC2
	.size	switchtec_ntb_init_db_msg_irq, .-switchtec_ntb_init_db_msg_irq
	.comm	switchtec_ntb_message_isr,4,4
	.comm	switchtec_ntb_doorbell_isr,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
