	.file	"extr_pcifront.c_put_pdev.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"freeing pdev @ 0x%p (ref_cnt=%d)\n"
	.text
	.p2align 4
	.type	put_pdev, @function
put_pdev:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR [rdi]
	lea	rdx, -1[rax]
	mov	QWORD PTR [rdi], rdx
	test	rdx, rdx
	jle	.L9
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rsi, rdi
	mov	rbp, rdi
	lea	rdi, .LC0[rip]
	call	DPRINTF@PLT
	mov	rsi, QWORD PTR 8[rbp]
	cmp	rsi, QWORD PTR INVALID_EVTCHN[rip]
	je	.L3
	mov	rdi, QWORD PTR 24[rbp]
	call	xenbus_free_evtchn@PLT
.L3:
	mov	rdi, QWORD PTR 16[rbp]
	cmp	rdi, QWORD PTR INVALID_GRANT_REF[rip]
	je	.L4
	mov	rdx, QWORD PTR 32[rbp]
	xor	esi, esi
	call	gnttab_end_foreign_access@PLT
.L4:
	mov	rax, QWORD PTR 24[rbp]
	mov	esi, DWORD PTR M_DEVBUF[rip]
	mov	rdi, rbp
	mov	QWORD PTR [rax], 0
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE0:
	.size	put_pdev, .-put_pdev
	.comm	M_DEVBUF,4,4
	.comm	INVALID_GRANT_REF,8,8
	.comm	INVALID_EVTCHN,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_pcifront.c_put_pdev.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"freeing pdev @ 0x%p (ref_cnt=%d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	put_pdev, %function
put_pdev:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, [r0]
	sub	r2, r2, #1
	cmp	r2, #0
	str	r2, [r0]
	bxgt	lr
	push	{r4, lr}
	mov	r4, r0
	mov	r1, r0
	ldr	r0, .L9
	bl	DPRINTF
	ldr	r3, .L9+4
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	cmp	r1, r3
	beq	.L3
	ldr	r0, [r4, #12]
	bl	xenbus_free_evtchn
.L3:
	ldr	r3, .L9+8
	ldr	r0, [r4, #8]
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L4
	mov	r1, #0
	ldr	r2, [r4, #16]
	bl	gnttab_end_foreign_access
.L4:
	mov	r1, #0
	ldr	r2, [r4, #12]
	ldr	r3, .L9+12
	mov	r0, r4
	pop	{r4, lr}
	str	r1, [r2]
	ldr	r1, [r3]
	b	free
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	INVALID_EVTCHN
	.word	INVALID_GRANT_REF
	.word	M_DEVBUF
	.size	put_pdev, .-put_pdev
	.comm	M_DEVBUF,4,4
	.comm	INVALID_GRANT_REF,4,4
	.comm	INVALID_EVTCHN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
