	.file	"extr_msi-xlp.c_xlp_setup_msix.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	xlp_setup_msix, @function
xlp_setup_msix:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	DWORD PTR 12[rsp], edi
	mov	edi, edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	PIC_PCIE_MSIX_IRQ@PLT
	mov	edi, r12d
	xor	esi, esi
	mov	r14d, eax
	call	nlm_link_msixirq@PLT
	mov	edi, r15d
	mov	esi, eax
	call	nlm_irq_to_xirq@PLT
	mov	edi, eax
	mov	ebx, eax
	call	irq_get_chip_data@PLT
	mov	esi, r12d
	mov	edi, r15d
	mov	rbp, rax
	call	MSIX_LINK_ADDR@PLT
	lea	r15, 4[rbp]
	xor	esi, esi
	mov	rdi, r15
	mov	r12d, eax
	call	spin_lock_irqsave@PLT
	mov	edi, DWORD PTR 0[rbp]
	test	edi, edi
	je	.L8
	call	fls@PLT
	cmp	DWORD PTR XLP_MSIXVEC_PER_LINK[rip], eax
	mov	r14d, eax
	je	.L9
.L3:
	mov	ecx, r14d
	mov	eax, 1
	xor	esi, esi
	add	r14d, ebx
	sal	eax, cl
	or	DWORD PTR 0[rbp], eax
	mov	rdi, r15
	call	spin_unlock_irqrestore@PLT
	mov	edi, r14d
	call	nlm_irq_msixvec@PLT
	mov	edx, r12d
	mov	ecx, 32
	mov	rsi, r13
	sar	edx, cl
	or	ah, 12
	mov	edi, r14d
	mov	DWORD PTR 32[rsp], r12d
	mov	DWORD PTR 28[rsp], edx
	mov	DWORD PTR 36[rsp], eax
	call	irq_set_msi_desc@PLT
	test	eax, eax
	js	.L1
	lea	rsi, 28[rsp]
	mov	edi, r14d
	call	pci_write_msi_msg@PLT
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 40[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L8:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rsp]
	mov	esi, r14d
	mov	edx, r12d
	call	xlp_config_link_msix@PLT
	mov	edi, DWORD PTR 0[rbp]
	call	fls@PLT
	cmp	DWORD PTR XLP_MSIXVEC_PER_LINK[rip], eax
	mov	r14d, eax
	jne	.L3
.L9:
	xor	esi, esi
	mov	rdi, r15
	call	spin_unlock_irqrestore@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	xlp_setup_msix, .-xlp_setup_msix
	.comm	XLP_MSIXVEC_PER_LINK,4,4
	.comm	ENOMEM,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_msi-xlp.c_xlp_setup_msix.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xlp_setup_msix, %function
xlp_setup_msix:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r3
	ldr	r3, .L11
	sub	sp, sp, #16
	mov	r9, r0
	mov	r0, r2
	mov	r4, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r6, r1
	bl	PIC_PCIE_MSIX_IRQ
	mov	r1, #0
	mov	r10, r0
	mov	r0, r4
	bl	nlm_link_msixirq
	mov	r1, r0
	mov	r0, r6
	bl	nlm_irq_to_xirq
	mov	r8, r0
	bl	irq_get_chip_data
	mov	r1, r4
	mov	r5, r0
	mov	r0, r6
	bl	MSIX_LINK_ADDR
	add	r4, r5, #4
	mov	r6, r0
	mov	r1, #0
	mov	r0, r4
	bl	spin_lock_irqsave
	ldr	r0, [r5]
	cmp	r0, #0
	beq	.L8
.L2:
	bl	fls
	ldr	r3, .L11+4
	mov	r2, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L9
	mov	r1, #1
	ldr	r3, [r5]
	add	r8, r8, r2
	orr	r3, r3, r1, lsl r2
	str	r3, [r5]
	mov	r1, #0
	mov	r0, r4
	bl	spin_unlock_irqrestore
	mov	r0, r8
	bl	nlm_irq_msixvec
	mov	r3, #32
	orr	r2, r0, #3072
	asr	r3, r6, r3
	mov	r1, r7
	mov	r0, r8
	stm	sp, {r3, r6}
	str	r2, [sp, #8]
	bl	irq_set_msi_desc
	cmp	r0, #0
	blt	.L1
	mov	r0, r8
	mov	r1, sp
	bl	pci_write_msi_msg
	mov	r0, #0
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	mov	r1, r10
	mov	r0, r9
	mov	r2, r6
	bl	xlp_config_link_msix
	ldr	r0, [r5]
	b	.L2
.L9:
	mov	r0, r4
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, .L11+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	XLP_MSIXVEC_PER_LINK
	.word	ENOMEM
	.size	xlp_setup_msix, .-xlp_setup_msix
	.comm	XLP_MSIXVEC_PER_LINK,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
