	.file	"extr_vfio_pci.c_vfio_pci_get_irq_count.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vfio_pci_get_irq_count, @function
vfio_pci_get_irq_count:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	cmp	DWORD PTR VFIO_PCI_INTX_IRQ_INDEX[rip], esi
	je	.L20
	cmp	DWORD PTR VFIO_PCI_MSI_IRQ_INDEX[rip], esi
	je	.L21
	cmp	DWORD PTR VFIO_PCI_MSIX_IRQ_INDEX[rip], esi
	je	.L22
	cmp	DWORD PTR VFIO_PCI_ERR_IRQ_INDEX[rip], esi
	je	.L23
	xor	eax, eax
	cmp	DWORD PTR VFIO_PCI_REQ_IRQ_INDEX[rip], esi
	sete	al
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L24
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rdi]
	xor	eax, eax
	mov	rsi, QWORD PTR 8[rdi]
	test	rsi, rsi
	je	.L1
	mov	rdx, rsp
	add	rsi, QWORD PTR PCI_MSI_FLAGS[rip]
	call	pci_read_config_word@PLT
	mov	ecx, DWORD PTR [rsp]
	and	ecx, DWORD PTR PCI_MSI_FLAGS_QMASK[rip]
	mov	eax, 1
	sar	ecx
	sal	eax, cl
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR CONFIG_VFIO_PCI_INTX[rip]
	call	IS_ENABLED@PLT
	test	eax, eax
	je	.L1
	xor	eax, eax
	cmp	QWORD PTR 8[rbx], 0
	jne	.L1
	mov	rdi, QWORD PTR [rbx]
	cmp	QWORD PTR 16[rdi], 0
	jne	.L1
	mov	esi, DWORD PTR PCI_INTERRUPT_PIN[rip]
	mov	rdx, rsp
	call	pci_read_config_byte@PLT
	xor	eax, eax
	cmp	QWORD PTR [rsp], 0
	setne	al
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, QWORD PTR [rdi]
	xor	eax, eax
	mov	rsi, QWORD PTR [rdi]
	test	rsi, rsi
	je	.L1
	mov	rdx, rsp
	add	rsi, QWORD PTR PCI_MSIX_FLAGS[rip]
	call	pci_read_config_word@PLT
	mov	eax, DWORD PTR [rsp]
	and	eax, DWORD PTR PCI_MSIX_FLAGS_QSIZE[rip]
	add	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rdi, QWORD PTR [rdi]
	call	pci_is_pcie@PLT
	test	rax, rax
	setne	al
	movzx	eax, al
	jmp	.L1
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vfio_pci_get_irq_count, .-vfio_pci_get_irq_count
	.comm	VFIO_PCI_REQ_IRQ_INDEX,4,4
	.comm	VFIO_PCI_MSI_IRQ_INDEX,4,4
	.comm	VFIO_PCI_MSIX_IRQ_INDEX,4,4
	.comm	VFIO_PCI_INTX_IRQ_INDEX,4,4
	.comm	VFIO_PCI_ERR_IRQ_INDEX,4,4
	.comm	PCI_MSI_FLAGS_QMASK,4,4
	.comm	PCI_MSI_FLAGS,8,8
	.comm	PCI_MSIX_FLAGS_QSIZE,4,4
	.comm	PCI_MSIX_FLAGS,8,8
	.comm	PCI_INTERRUPT_PIN,4,4
	.comm	CONFIG_VFIO_PCI_INTX,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_vfio_pci.c_vfio_pci_get_irq_count.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vfio_pci_get_irq_count, %function
vfio_pci_get_irq_count:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r3, .L28
	ldr	r2, .L28+4
	ldr	r3, [r3]
	sub	sp, sp, #8
	cmp	r3, r1
	mov	r4, r0
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	beq	.L23
	ldr	r3, .L28+8
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L24
	ldr	r3, .L28+12
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L25
	ldr	r3, .L28+16
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L26
	ldr	r3, .L28+20
	ldr	r0, [r3]
	sub	r1, r0, r1
	clz	r1, r1
	lsr	r1, r1, #5
.L1:
	ldr	r3, .L28+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	mov	r0, r1
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L24:
	ldr	r0, [r0]
	ldr	r1, [r0, #4]
	cmp	r1, #0
	beq	.L1
	ldr	r3, .L28+24
	mov	r2, sp
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	pci_read_config_word
	mov	r1, #1
	ldr	r3, .L28+28
	ldr	r0, [sp]
	ldr	r3, [r3]
	and	r0, r0, r3
	asr	r0, r0, r1
	lsl	r1, r1, r0
	b	.L1
.L23:
	ldr	r3, .L28+32
	ldr	r0, [r3]
	bl	IS_ENABLED
	subs	r1, r0, #0
	beq	.L1
	ldr	r1, [r4, #4]
	cmp	r1, #0
	movne	r1, #0
	bne	.L1
	ldr	r0, [r4]
	ldr	r3, [r0, #8]
	cmp	r3, #0
	bne	.L1
	ldr	r3, .L28+36
	mov	r2, sp
	ldr	r1, [r3]
	bl	pci_read_config_byte
	ldr	r1, [sp]
	subs	r1, r1, #0
	movne	r1, #1
	b	.L1
.L25:
	ldr	r0, [r0]
	ldr	r1, [r0]
	cmp	r1, #0
	beq	.L1
	ldr	r3, .L28+40
	mov	r2, sp
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	pci_read_config_word
	ldr	r3, .L28+44
	ldr	r1, [sp]
	ldr	r3, [r3]
	and	r1, r1, r3
	add	r1, r1, #1
	b	.L1
.L26:
	ldr	r0, [r0]
	bl	pci_is_pcie
	subs	r1, r0, #0
	movne	r1, #1
	b	.L1
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	VFIO_PCI_INTX_IRQ_INDEX
	.word	.LC0
	.word	VFIO_PCI_MSI_IRQ_INDEX
	.word	VFIO_PCI_MSIX_IRQ_INDEX
	.word	VFIO_PCI_ERR_IRQ_INDEX
	.word	VFIO_PCI_REQ_IRQ_INDEX
	.word	PCI_MSI_FLAGS
	.word	PCI_MSI_FLAGS_QMASK
	.word	CONFIG_VFIO_PCI_INTX
	.word	PCI_INTERRUPT_PIN
	.word	PCI_MSIX_FLAGS
	.word	PCI_MSIX_FLAGS_QSIZE
	.size	vfio_pci_get_irq_count, .-vfio_pci_get_irq_count
	.comm	VFIO_PCI_REQ_IRQ_INDEX,4,4
	.comm	VFIO_PCI_MSI_IRQ_INDEX,4,4
	.comm	VFIO_PCI_MSIX_IRQ_INDEX,4,4
	.comm	VFIO_PCI_INTX_IRQ_INDEX,4,4
	.comm	VFIO_PCI_ERR_IRQ_INDEX,4,4
	.comm	PCI_MSI_FLAGS_QMASK,4,4
	.comm	PCI_MSI_FLAGS,4,4
	.comm	PCI_MSIX_FLAGS_QSIZE,4,4
	.comm	PCI_MSIX_FLAGS,4,4
	.comm	PCI_INTERRUPT_PIN,4,4
	.comm	CONFIG_VFIO_PCI_INTX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
