	.file	"extr_vfio_pci.c_vfio_pci_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vfio_pci_open, @function
vfio_pci_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR THIS_MODULE[rip]
	call	try_module_get@PLT
	test	eax, eax
	jne	.L2
	mov	r12d, DWORD PTR ENODEV[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rbx]
	call	mutex_lock@PLT
	mov	eax, DWORD PTR 8[rbx]
	test	eax, eax
	je	.L8
.L4:
	add	eax, 1
	mov	rdi, QWORD PTR [rbx]
	xor	r12d, r12d
	mov	DWORD PTR 8[rbx], eax
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rdi, rbx
	call	vfio_pci_enable@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	mov	edi, DWORD PTR 12[rbx]
	call	vfio_spapr_pci_eeh_open@PLT
	mov	eax, DWORD PTR 8[rbx]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, QWORD PTR [rbx]
	call	mutex_unlock@PLT
	mov	edi, DWORD PTR THIS_MODULE[rip]
	call	module_put@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	vfio_pci_open, .-vfio_pci_open
	.comm	THIS_MODULE,4,4
	.comm	ENODEV,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_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vfio_pci_open, %function
vfio_pci_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L9
	mov	r4, r0
	ldr	r0, [r6]
	bl	try_module_get
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L9+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r0, [r4]
	bl	mutex_lock
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L8
.L4:
	mov	r5, #0
	add	r3, r3, #1
	ldr	r0, [r4]
	str	r3, [r4, #4]
	bl	mutex_unlock
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L8:
	mov	r0, r4
	bl	vfio_pci_enable
	subs	r5, r0, #0
	bne	.L5
	ldr	r0, [r4, #8]
	bl	vfio_spapr_pci_eeh_open
	ldr	r3, [r4, #4]
	b	.L4
.L5:
	ldr	r0, [r4]
	bl	mutex_unlock
	ldr	r0, [r6]
	bl	module_put
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L10:
	.align	2
.L9:
	.word	THIS_MODULE
	.word	ENODEV
	.size	vfio_pci_open, .-vfio_pci_open
	.comm	THIS_MODULE,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
