	.file	"extr_gntdev.c_gntdev_put_map.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	gntdev_put_map
	.type	gntdev_put_map, @function
gntdev_put_map:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L21
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	lea	rdi, 28[rsi]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	refcount_dec_and_test@PLT
	test	eax, eax
	jne	.L25
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, pages_mapped[rip]
	call	atomic_sub@PLT
	mov	eax, DWORD PTR 20[rbp]
	test	DWORD PTR UNMAP_NOTIFY_SEND_EVENT[rip], eax
	jne	.L26
.L5:
	cmp	QWORD PTR populate_freeable_maps[rip], 0
	je	.L6
	test	r12, r12
	jne	.L27
.L6:
	cmp	QWORD PTR 8[rbp], 0
	je	.L7
	mov	eax, DWORD PTR use_ptemod[rip]
	test	eax, eax
	jne	.L7
	mov	edx, DWORD PTR 0[rbp]
	xor	esi, esi
	mov	rdi, rbp
	call	unmap_grant_pages@PLT
.L7:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	gntdev_free_map@PLT
	.p2align 4,,10
	.p2align 3
.L21:
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	mov	rdi, r12
	call	mutex_lock@PLT
	lea	rdi, 16[rbp]
	call	list_del@PLT
	mov	rdi, r12
	call	mutex_unlock@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, DWORD PTR 24[rbp]
	call	notify_remote_via_evtchn@PLT
	mov	edi, DWORD PTR 24[rbp]
	call	evtchn_put@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	gntdev_put_map, .-gntdev_put_map
	.comm	use_ptemod,4,4
	.comm	populate_freeable_maps,8,8
	.comm	pages_mapped,4,4
	.comm	UNMAP_NOTIFY_SEND_EVENT,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_gntdev.c_gntdev_put_map.c"
	.text
	.align	2
	.global	gntdev_put_map
	.syntax unified
	.arm
	.fpu softvfp
	.type	gntdev_put_map, %function
gntdev_put_map:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r1, #0
	popeq	{r4, r5, r6, pc}
	mov	r5, r0
	add	r0, r4, #20
	bl	refcount_dec_and_test
	cmp	r0, #0
	popeq	{r4, r5, r6, pc}
	ldr	r1, .L24
	ldr	r0, [r4]
	bl	atomic_sub
	ldr	r3, .L24+4
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L22
.L5:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	cmp	r3, #0
	cmpne	r5, #0
	bne	.L23
.L6:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L24+12
	ldr	r1, [r3]
	cmp	r1, #0
	bne	.L7
	mov	r0, r4
	ldr	r2, [r4]
	bl	unmap_grant_pages
.L7:
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	gntdev_free_map
.L22:
	ldr	r0, [r4, #16]
	bl	notify_remote_via_evtchn
	ldr	r0, [r4, #16]
	bl	evtchn_put
	b	.L5
.L23:
	mov	r0, r5
	bl	mutex_lock
	add	r0, r4, #8
	bl	list_del
	mov	r0, r5
	bl	mutex_unlock
	b	.L6
.L25:
	.align	2
.L24:
	.word	pages_mapped
	.word	UNMAP_NOTIFY_SEND_EVENT
	.word	populate_freeable_maps
	.word	use_ptemod
	.size	gntdev_put_map, .-gntdev_put_map
	.comm	use_ptemod,4,4
	.comm	populate_freeable_maps,4,4
	.comm	pages_mapped,4,4
	.comm	UNMAP_NOTIFY_SEND_EVENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
